summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/amount.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/amount.cc b/src/amount.cc
index b014112b..6479ca3d 100644
--- a/src/amount.cc
+++ b/src/amount.cc
@@ -268,7 +268,7 @@ namespace {
}
if (sign) {
- char * newbuf = new char[std::strlen(result ? result : buf) + 2];
+ char * newbuf = new char[std::strlen(result ? result : buf) + 4];
newbuf[0] = '-';
std::strcpy(&newbuf[1], result ? result : buf);
mpz_set_str(dest, newbuf, 10);