summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-09-28 18:45:34 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-09-28 18:45:34 (GMT)
commit3d5f129cb0f1208fab8b96b4a86777ea25744163 (patch)
tree02cfe584c787a439cef8b585c16eb21c1c9345d0
parent6cdb3193ec55c1fa18fb9f6c73f290e60f6ddd1d (diff)
downloadtcl-3d5f129cb0f1208fab8b96b4a86777ea25744163.zip
tcl-3d5f129cb0f1208fab8b96b4a86777ea25744163.tar.gz
tcl-3d5f129cb0f1208fab8b96b4a86777ea25744163.tar.bz2
Another patch contributed by Gustaf Neumann: shifting negative numbers is undefined behavior in the C standard
https://stackoverflow.com/questions/8415895/is-left-and-right-shifting-negative-integers-defined-behavior
-rw-r--r--generic/tclCompile.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tclCompile.h b/generic/tclCompile.h
index 6aaa855..0466429 100644
--- a/generic/tclCompile.h
+++ b/generic/tclCompile.h
@@ -1494,7 +1494,7 @@ MODULE_SCOPE int TclPushProcCallFrame(ClientData clientData,
#endif
#define TclGetInt4AtPtr(p) \
- (((int) TclGetInt1AtPtr(p) << 24) | \
+ (((int) (TclGetUInt1AtPtr(p) << 24)) | \
(*((p)+1) << 16) | \
(*((p)+2) << 8) | \
(*((p)+3)))