Fix Finance::Quote use on Win32.

By dealing with Win32 \r\n newlines on return from finance-quote-wrapper.
pull/1593/head
John Ralls 3 years ago
parent a587dfff2c
commit 0d598d51ed

@ -237,8 +237,13 @@ GncFQQuoteSource::run_cmd (const StrVec& args, const std::string& json_string) c
std::istream is(&sb);
while (std::getline(is, line) && !line.empty())
{
#ifdef __WIN32
if (line.back() == '\r')
line.pop_back();
#endif
out_vec.push_back (std::move(line));
}
raw = err_buf.get();
bio::stream_buffer<bio::array_source> eb(raw.data(), raw.size());
std::istream es(&eb);

Loading…
Cancel
Save