diff options
author | John Wiegley <johnw@newartisans.com> | 2012-03-10 21:34:37 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-03-10 21:34:37 -0600 |
commit | 1956393a44b981ef722dc1eab0264c4f714a81a6 (patch) | |
tree | 52a6b57535447566266a5495475b7d97c883cb17 /src/value.cc | |
parent | 7b45a664f2d188065dadb8506742f718982373eb (diff) | |
download | fork-ledger-1956393a44b981ef722dc1eab0264c4f714a81a6.tar.gz fork-ledger-1956393a44b981ef722dc1eab0264c4f714a81a6.tar.bz2 fork-ledger-1956393a44b981ef722dc1eab0264c4f714a81a6.zip |
Allow conversion of negative values with int()
Diffstat (limited to 'src/value.cc')
-rw-r--r-- | src/value.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/value.cc b/src/value.cc index 87b31cd6..97328c37 100644 --- a/src/value.cc +++ b/src/value.cc @@ -1228,7 +1228,7 @@ void value_t::in_place_cast(type_t cast_type) case STRING: switch (cast_type) { case INTEGER: { - if (all(as_string(), is_digit())) { + if (all(as_string(), is_any_of("-0123456789"))) { set_long(lexical_cast<long>(as_string())); return; } |