From f8a62c444f070b5e7f1ed00a2a322d01da729775 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 26 Sep 2004 23:48:31 -0400 Subject: made several of the buffers used non-static --- amount.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'amount.cc') diff --git a/amount.cc b/amount.cc index 98f7cf63..1a538f40 100644 --- a/amount.cc +++ b/amount.cc @@ -671,27 +671,26 @@ std::ostream& operator<<(std::ostream& _out, const amount_t& amt) void parse_quantity(std::istream& in, std::string& value) { - static char buf[256]; + char buf[256]; char c = peek_next_nonws(in); - READ_INTO(in, buf, 256, c, + READ_INTO(in, buf, 255, c, std::isdigit(c) || c == '-' || c == '.' || c == ','); value = buf; } void parse_commodity(std::istream& in, std::string& symbol) { - static char buf[256]; - + char buf[256]; char c = peek_next_nonws(in); if (c == '"') { in.get(c); - READ_INTO(in, buf, 256, c, c != '"'); + READ_INTO(in, buf, 255, c, c != '"'); if (c == '"') in.get(c); else throw amount_error("Quoted commodity symbol lacks closing quote"); } else { - READ_INTO(in, buf, 256, c, ! std::isspace(c) && ! std::isdigit(c) && + READ_INTO(in, buf, 255, c, ! std::isspace(c) && ! std::isdigit(c) && c != '-' && c != '.'); } symbol = buf; -- cgit v1.2.3