diff options
author | Steve Bennett <steveb@workware.net.au> | 2020-05-02 16:43:01 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2020-05-04 21:58:38 +1000 |
commit | b58ccf39a730dba009abbbae19cb55e0200d37ac (patch) | |
tree | a48eb4289f3b10b4ca53535bb4eec8b9f68b5bc6 /jim.c | |
parent | 72c78e31ab153f318e431c81cfc4b9d08701a515 (diff) | |
download | jimtcl-b58ccf39a730dba009abbbae19cb55e0200d37ac.zip jimtcl-b58ccf39a730dba009abbbae19cb55e0200d37ac.tar.gz jimtcl-b58ccf39a730dba009abbbae19cb55e0200d37ac.tar.bz2 |
jim.c: Fix UpdateStringOfIndex()
In case the index is invalid, the string should contain -MAX_INT
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim.c')
-rw-r--r-- | jim.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -7414,7 +7414,7 @@ static void UpdateStringOfIndex(struct Jim_Obj *objPtr) } else { char buf[JIM_INTEGER_SPACE + 1]; - if (objPtr->internalRep.intValue >= 0) { + if (objPtr->internalRep.intValue >= 0 || objPtr->internalRep.intValue == -INT_MAX) { sprintf(buf, "%d", objPtr->internalRep.intValue); } else { |