aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2013-03-28 07:17:24 +1000
committerSteve Bennett <steveb@workware.net.au>2013-03-28 07:17:24 +1000
commitc7e5c48c4434835a19628ebecfa1bf59883f5f58 (patch)
tree04d6f13a96f9c4bacb8347c23935931fab63b836
parentb2a0a2c391785828aef4b6a1d2e69ca939f3734a (diff)
downloadjimtcl-c7e5c48c4434835a19628ebecfa1bf59883f5f58.zip
jimtcl-c7e5c48c4434835a19628ebecfa1bf59883f5f58.tar.gz
jimtcl-c7e5c48c4434835a19628ebecfa1bf59883f5f58.tar.bz2
Need abs() since modulo of -ve is impl dependent
Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r--jim.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/jim.c b/jim.c
index 1fc6794..a82b2e4 100644
--- a/jim.c
+++ b/jim.c
@@ -427,7 +427,7 @@ static int JimWideToString(char *buf, jim_wide wideValue)
if (wideValue < 0) {
buf[pos++] = '-';
- tmp[num++] = -(wideValue % 10);
+ tmp[num++] = abs(wideValue % 10);
wideValue /= -10;
}