aboutsummaryrefslogtreecommitdiff
path: root/jim.c
diff options
context:
space:
mode:
authorantirez <antirez>2005-03-19 21:39:34 +0000
committerantirez <antirez>2005-03-19 21:39:34 +0000
commit76e16dfe41d1cad0a7f01d1a45de0cbffe525c94 (patch)
treee48c4266e7453995a5852b28b5c56a9c48e0b320 /jim.c
parent4212adfb46da94fa2851dd688889578127044de6 (diff)
downloadjimtcl-76e16dfe41d1cad0a7f01d1a45de0cbffe525c94.zip
jimtcl-76e16dfe41d1cad0a7f01d1a45de0cbffe525c94.tar.gz
jimtcl-76e16dfe41d1cad0a7f01d1a45de0cbffe525c94.tar.bz2
Jim_GetIndex() bug fixed (SS)
Diffstat (limited to 'jim.c')
-rw-r--r--jim.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/jim.c b/jim.c
index b553169..9b619e4 100644
--- a/jim.c
+++ b/jim.c
@@ -1,7 +1,7 @@
/* Jim - A small embeddable Tcl interpreter
* Copyright 2005 Salvatore Sanfilippo <antirez@invece.org>
*
- * $Id: jim.c,v 1.121 2005/03/19 19:12:30 antirez Exp $
+ * $Id: jim.c,v 1.122 2005/03/19 21:39:34 antirez Exp $
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -5563,7 +5563,7 @@ int Jim_GetIndex(Jim_Interp *interp, Jim_Obj *objPtr, int *indexPtr)
if (objPtr->typePtr == &intObjType) {
jim_wide val = objPtr->internalRep.wideValue;
if (!(val < LONG_MIN) && !(val > LONG_MAX)) {
- *indexPtr = (val < 0) ? INT_MAX : (long)val;;
+ *indexPtr = (val < 0) ? -INT_MAX : (long)val;;
return JIM_OK;
}
}
@@ -10206,7 +10206,7 @@ int Jim_InteractivePrompt(Jim_Interp *interp)
printf("Welcome to Jim version %d.%d, "
"Copyright (c) 2005 Salvatore Sanfilippo\n",
JIM_VERSION / 100, JIM_VERSION % 100);
- printf("CVS ID: $Id: jim.c,v 1.121 2005/03/19 19:12:30 antirez Exp $\n");
+ printf("CVS ID: $Id: jim.c,v 1.122 2005/03/19 21:39:34 antirez Exp $\n");
Jim_SetVariableStrWithStr(interp, "jim_interactive", "1");
while (1) {
char buf[1024];