diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-11-25 14:39:45 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-11-25 14:39:45 (GMT) |
commit | 081f863e54063f377dae45d88e0386f2a4bb7275 (patch) | |
tree | efc8b6ab3ac3469bc189e97e046e311612f86f28 /generic | |
parent | a1cba8516e8feb3de5d8036307d722e60fd72636 (diff) | |
download | tk-081f863e54063f377dae45d88e0386f2a4bb7275.zip tk-081f863e54063f377dae45d88e0386f2a4bb7275.tar.gz tk-081f863e54063f377dae45d88e0386f2a4bb7275.tar.bz2 |
Slightly better: Check for specPtr->offset < 0 before doing calculations with it
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkOldConfig.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tkOldConfig.c b/generic/tkOldConfig.c index 2e597bf..7854246 100644 --- a/generic/tkOldConfig.c +++ b/generic/tkOldConfig.c @@ -983,10 +983,10 @@ Tk_FreeOptions( if ((specPtr->specFlags & needFlags) != needFlags) { continue; } - ptr = widgRec + specPtr->offset; if (specPtr->offset < 0) { continue; } + ptr = widgRec + specPtr->offset; switch (specPtr->type) { case TK_CONFIG_STRING: if (*((char **) ptr) != NULL) { |