diff options
author | dgp <dgp@users.sourceforge.net> | 2011-06-07 21:06:06 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2011-06-07 21:06:06 (GMT) |
commit | e77ca00583903b3d69c7c80d987b99134eb8fa05 (patch) | |
tree | d5a774bdf752755cf7bdd4c82caa062ea0530e67 /generic/tkEntry.c | |
parent | 2da308287ac0cb828ac2fd46fa33981a0a80c547 (diff) | |
download | tk-e77ca00583903b3d69c7c80d987b99134eb8fa05.zip tk-e77ca00583903b3d69c7c80d987b99134eb8fa05.tar.gz tk-e77ca00583903b3d69c7c80d987b99134eb8fa05.tar.bz2 |
Bug 2358545: Restore support for values "08" and "09"in a [spinbox] configured
to use -from and -to values.
Diffstat (limited to 'generic/tkEntry.c')
-rw-r--r-- | generic/tkEntry.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/generic/tkEntry.c b/generic/tkEntry.c index 3694375..f1c4816 100644 --- a/generic/tkEntry.c +++ b/generic/tkEntry.c @@ -1330,11 +1330,10 @@ ConfigureEntry( * isn't a double value, we set it to -from. */ - int code; double dvalue; - code = Tcl_GetDouble(NULL, entryPtr->string, &dvalue); - if (code != TCL_OK) { + if (sscanf(entryPtr->string, "%lf", &dvalue) == 0) { + /* Scan failure */ dvalue = sbPtr->fromValue; } else { if (dvalue > sbPtr->toValue) { @@ -4241,9 +4240,9 @@ SpinboxInvoke( } else if (!DOUBLES_EQ(sbPtr->fromValue, sbPtr->toValue)) { double dvalue; - if (Tcl_GetDouble(NULL, entryPtr->string, &dvalue) != TCL_OK) { + if (sscanf(entryPtr->string, "%lf", &dvalue) == 0) { /* - * If the string is empty, or isn't a valid double value, just + * If the string doesn't scan as a double value, just * use the -from value */ |