diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-02-01 14:07:57 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-02-01 14:07:57 (GMT) |
commit | 17c2f38cf3b2ef52b10d836edd3057f9be421dc6 (patch) | |
tree | 10351b6dcd53608b5d43a6c5075ae4570f4c04fc /generic | |
parent | 898eb85069d616f62bf5bcda7e4a5915ccc55a61 (diff) | |
download | tk-17c2f38cf3b2ef52b10d836edd3057f9be421dc6.zip tk-17c2f38cf3b2ef52b10d836edd3057f9be421dc6.tar.gz tk-17c2f38cf3b2ef52b10d836edd3057f9be421dc6.tar.bz2 |
Same protection for TK_OPTION_BOOLEAN too.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkConfig.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/generic/tkConfig.c b/generic/tkConfig.c index fa5d097..6c3575f 100644 --- a/generic/tkConfig.c +++ b/generic/tkConfig.c @@ -1927,6 +1927,10 @@ GetObjectForOption( internalPtr = (char *)recordPtr + optionPtr->specPtr->internalOffset; switch (optionPtr->specPtr->type) { case TK_OPTION_BOOLEAN: + if (*((int *) internalPtr) < 0) { + break; + } + /* FALLTHRU */ case TK_OPTION_INT: objPtr = Tcl_NewWideIntObj(*((int *)internalPtr)); break; |