summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-09-04 14:51:24 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-09-04 14:51:24 (GMT)
commit17b29d382d70ebd534f9f06c1f0f575dbfb978ae (patch)
tree9eaf3c44a18f946e1aaa8c3584f023b178aec42a /win
parent9ad55137f6cdb5570ddd58f92495fb651daf4d16 (diff)
parent3eb69aee6980150b2fabbaaab9c5bb154af74d02 (diff)
downloadtk-17b29d382d70ebd534f9f06c1f0f575dbfb978ae.zip
tk-17b29d382d70ebd534f9f06c1f0f575dbfb978ae.tar.gz
tk-17b29d382d70ebd534f9f06c1f0f575dbfb978ae.tar.bz2
Fix [6cc8002951]: numeric parameter errors depending on whether string vs double/int rep
Diffstat (limited to 'win')
-rw-r--r--win/tkWinGDI.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/win/tkWinGDI.c b/win/tkWinGDI.c
index 8b1bbff..f05bebc 100644
--- a/win/tkWinGDI.c
+++ b/win/tkWinGDI.c
@@ -2142,11 +2142,7 @@ static int GdiCopyBits(
}
} else if (strcmp(argv[k], "-scale") == 0) {
if (argv[++k]) {
- scale = strtod(argv[k], &strend);
- if (strend == 0 || strend == argv[k]) {
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "Can't understand scale specification %s",
- argv[k]));
+ if (Tcl_GetDouble(interp, argv[k], &scale) != TCL_OK) {
return TCL_ERROR;
}
if (scale <= 0.01 || scale >= 100.0) {