summaryrefslogtreecommitdiff
path: root/src/textual.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/textual.cc')
-rw-r--r--src/textual.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/textual.cc b/src/textual.cc
index c5a6d896..cbeb6358 100644
--- a/src/textual.cc
+++ b/src/textual.cc
@@ -1050,6 +1050,9 @@ post_t * instance_t::parse_post(char * line,
*post->cost *= post->amount;
post->cost->set_commodity(cost_commodity);
}
+ else if (post->amount.sign() < 0) {
+ post->cost->in_place_negate();
+ }
DEBUG("textual.parse", "line " << linenum << ": "
<< "Total cost is " << *post->cost);