diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-01-12 14:19:04 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-01-12 14:19:04 (GMT) |
commit | 2fa8967c62a728986e69c0adfcc433c8da2d6dd4 (patch) | |
tree | 2da0e541ba3942cb57eb71026b48e3a6b04c74ba /generic | |
parent | 5608e51a46c5ddb594d05a3d9cbeace701b5dcc6 (diff) | |
download | tcl-2fa8967c62a728986e69c0adfcc433c8da2d6dd4.zip tcl-2fa8967c62a728986e69c0adfcc433c8da2d6dd4.tar.gz tcl-2fa8967c62a728986e69c0adfcc433c8da2d6dd4.tar.bz2 |
Proposed fix for [26f1328a86]: sizeof(int) < sizeof(void*) -> Crash
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclCompile.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/generic/tclCompile.h b/generic/tclCompile.h index 03b4a90..997f08e 100644 --- a/generic/tclCompile.h +++ b/generic/tclCompile.h @@ -1509,22 +1509,22 @@ MODULE_SCOPE int TclPushProcCallFrame(ClientData clientData, # define TclGetInt1AtPtr(p) ((int) *((signed char *) p)) #else # define TclGetInt1AtPtr(p) \ - (((int) *((char *) p)) | ((*(p) & 0200) ? (-256) : 0)) + ((int) ((*((char *) p)) | ((*(p) & 0200) ? (-256) : 0))) #endif #define TclGetInt4AtPtr(p) \ - (((int) (TclGetUInt1AtPtr(p) << 24)) | \ - (*((p)+1) << 16) | \ - (*((p)+2) << 8) | \ - (*((p)+3))) + ((int) ((TclGetUInt1AtPtr(p) << 24) | \ + (*((p)+1) << 16) | \ + (*((p)+2) << 8) | \ + (*((p)+3)))) #define TclGetUInt1AtPtr(p) \ ((unsigned int) *(p)) #define TclGetUInt4AtPtr(p) \ - ((unsigned int) (*(p) << 24) | \ - (*((p)+1) << 16) | \ - (*((p)+2) << 8) | \ - (*((p)+3))) + ((unsigned int) ((*(p) << 24) | \ + (*((p)+1) << 16) | \ + (*((p)+2) << 8) | \ + (*((p)+3)))) /* * Macros used to compute the minimum and maximum of two integers. The ANSI C |