summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2009-01-08 17:55:41 (GMT)
committerdgp <dgp@users.sourceforge.net>2009-01-08 17:55:41 (GMT)
commitb98ad0d6cb97c6c201972b177bc0578706aee6cd (patch)
treeaede920ee8e87cf1092ac0a0d86bd416b0f64868 /generic
parent2fa2e74c29e259ce386e78b98f45efdfac56e11f (diff)
downloadtcl-b98ad0d6cb97c6c201972b177bc0578706aee6cd.zip
tcl-b98ad0d6cb97c6c201972b177bc0578706aee6cd.tar.gz
tcl-b98ad0d6cb97c6c201972b177bc0578706aee6cd.tar.bz2
* generic/tclStringObj.c (STRING_UALLOC): Added missing parens
required to get correct results out of things like STRING_UALLOC(num + append). [Bug 2494093].
Diffstat (limited to 'generic')
-rw-r--r--generic/tclStringObj.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index b9311ec..9ab1abb 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -33,7 +33,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclStringObj.c,v 1.70.2.1 2008/04/07 16:07:00 dgp Exp $ */
+ * RCS: @(#) $Id: tclStringObj.c,v 1.70.2.2 2009/01/08 17:55:41 dgp Exp $ */
#include "tclInt.h"
#include "tommath.h"
@@ -106,7 +106,7 @@ typedef struct String {
} String;
#define STRING_UALLOC(numChars) \
- (numChars * sizeof(Tcl_UniChar))
+ ((numChars) * sizeof(Tcl_UniChar))
#define STRING_SIZE(ualloc) \
((unsigned) ((ualloc) \
? sizeof(String) - sizeof(Tcl_UniChar) + (ualloc) \