summaryrefslogtreecommitdiffstats
path: root/generic/tclStrToD.c
diff options
context:
space:
mode:
authorgriffin <briang42@easystreet.net>2023-09-01 15:17:41 (GMT)
committergriffin <briang42@easystreet.net>2023-09-01 15:17:41 (GMT)
commit8a8190bc2dce119f561ec7d4b5e840f963b81211 (patch)
tree072e0e27854c6d7cb41a47e28dd2bfb13eebe5c6 /generic/tclStrToD.c
parentce4872f00b224d6f0e76bb578b37b7b796dfc19a (diff)
downloadtcl-8a8190bc2dce119f561ec7d4b5e840f963b81211.zip
tcl-8a8190bc2dce119f561ec7d4b5e840f963b81211.tar.gz
tcl-8a8190bc2dce119f561ec7d4b5e840f963b81211.tar.bz2
Fix bug with octal. Add floating point example to doc.
Diffstat (limited to 'generic/tclStrToD.c')
-rw-r--r--generic/tclStrToD.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c
index 4912441..36261c3 100644
--- a/generic/tclStrToD.c
+++ b/generic/tclStrToD.c
@@ -610,8 +610,8 @@ TclParseNumber(
break;
case ZERO_O:
case OCTAL:
- if (((!before || (*before < '0' || '7' < *before))) ||
- ((!before || (*after < '0' || '7' < *after)))) {
+ if (((before && (*before < '0' || '7' < *before))) ||
+ ((after && (*after < '0' || '7' < *after)))) {
goto endgame;
}
break;