diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-01-23 09:11:34 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-01-23 09:11:34 (GMT) |
commit | 000147c3a5bd1e6c44efc6e8f56f8e61c86fc0d4 (patch) | |
tree | 713c68ff63524c90b5f59d85a3f146f0cb45d145 /generic/tclLink.c | |
parent | 814bdc470b9b20e53414976461a9c8bd41651f8d (diff) | |
parent | f73959c2df224df88d79415e16dfab56b8756008 (diff) | |
download | tcl-000147c3a5bd1e6c44efc6e8f56f8e61c86fc0d4.zip tcl-000147c3a5bd1e6c44efc6e8f56f8e61c86fc0d4.tar.gz tcl-000147c3a5bd1e6c44efc6e8f56f8e61c86fc0d4.tar.bz2 |
Merge trunk
Diffstat (limited to 'generic/tclLink.c')
-rw-r--r-- | generic/tclLink.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/generic/tclLink.c b/generic/tclLink.c index d6d709f..2ead6df 100644 --- a/generic/tclLink.c +++ b/generic/tclLink.c @@ -722,8 +722,8 @@ SetInvalidRealFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr) { /* * This function checks for integer representations, which are valid * when linking with C variables, but which are invalid in other - * contexts in Tcl. Handled are "+", "-", "0x", "0b" and "0o" (upper- - * and lowercase). See bug [39f6304c2e]. + * contexts in Tcl. Handled are "", "+", "-", "0x", "0b" and "0o" + * (upperand lowercase). See bug [39f6304c2e]. */ int GetInvalidIntFromObj(Tcl_Obj *objPtr, @@ -735,7 +735,8 @@ GetInvalidIntFromObj(Tcl_Obj *objPtr, if ((length == 1) && strchr("+-", str[0])) { *intPtr = (str[0] == '+'); return TCL_OK; - } else if ((length == 2) && (str[0] == '0') && strchr("xXbBoO", str[1])) { + } else if ((length == 0) || + ((length == 2) && (str[0] == '0') && strchr("xXbBoO", str[1]))) { *intPtr = 0; return TCL_OK; } |