From 3c0c59407f61fb9c78ced15b50d084b3670ca7b8 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 19 Oct 2020 11:29:22 +0000 Subject: Fix warning on MSVC: warning C4307: '+': integral constant overflow --- generic/tclInt.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/tclInt.h b/generic/tclInt.h index 2e88348..c536aee 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -4851,7 +4851,7 @@ MODULE_SCOPE Tcl_PackageInitProc Procbodytest_SafeInit; (objPtr) = Tcl_NewWideIntObj(w) #define TclNewIndexObj(objPtr, w) \ - (objPtr) = Tcl_NewWideIntObj((Tcl_WideInt)((w) + 1) - 1) + (objPtr) = (w == TCL_INDEX_NONE) ? Tcl_NewWideIntObj(-1) : Tcl_NewWideIntObj(w) #define TclNewDoubleObj(objPtr, d) \ (objPtr) = Tcl_NewDoubleObj(d) -- cgit v0.12