summaryrefslogtreecommitdiffstats
path: root/generic/tclBasic.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r--generic/tclBasic.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c
index 1649998..9073642 100644
--- a/generic/tclBasic.c
+++ b/generic/tclBasic.c
@@ -8224,7 +8224,9 @@ ExprIsUnorderedFunc(
if (type == TCL_NUMBER_NAN) {
result = 1;
} else {
- d = *((const double *) ptr);
+ if (Tcl_GetDoubleFromObj(interp, objv[1], &d) != TCL_OK) {
+ return TCL_ERROR;
+ }
result = (ClassifyDouble(d) == FP_NAN);
}
@@ -8234,7 +8236,9 @@ ExprIsUnorderedFunc(
if (type == TCL_NUMBER_NAN) {
result |= 1;
} else {
- d = *((const double *) ptr);
+ if (Tcl_GetDoubleFromObj(interp, objv[2], &d) != TCL_OK) {
+ return TCL_ERROR;
+ }
result |= (ClassifyDouble(d) == FP_NAN);
}