diff options
author | John Wiegley <johnw@newartisans.com> | 2004-09-26 23:48:31 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-09-26 23:48:31 -0400 |
commit | f8a62c444f070b5e7f1ed00a2a322d01da729775 (patch) | |
tree | e5ec1becde3b9f05d2fe6b1b1b49cb2732a6960f /amount.cc | |
parent | f32f698d7f097234ebabe725e8f8aaa1fa740753 (diff) | |
download | fork-ledger-f8a62c444f070b5e7f1ed00a2a322d01da729775.tar.gz fork-ledger-f8a62c444f070b5e7f1ed00a2a322d01da729775.tar.bz2 fork-ledger-f8a62c444f070b5e7f1ed00a2a322d01da729775.zip |
made several of the buffers used non-static
Diffstat (limited to 'amount.cc')
-rw-r--r-- | amount.cc | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -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; |