summaryrefslogtreecommitdiff
path: root/src/value.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-10 21:34:37 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-03-10 21:34:37 -0600
commit1956393a44b981ef722dc1eab0264c4f714a81a6 (patch)
tree52a6b57535447566266a5495475b7d97c883cb17 /src/value.cc
parent7b45a664f2d188065dadb8506742f718982373eb (diff)
downloadfork-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.cc2
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;
}