diff options
author | dgp <dgp@noemail.net> | 2009-01-08 17:57:31 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2009-01-08 17:57:31 (GMT) |
commit | e8a88320e534c01ce8047b879b5735c77ae8e115 (patch) | |
tree | 460224d955fcb090df63e602dbc0db8397f02c18 /generic/tclStringObj.c | |
parent | 6a7d8b98cf4cc829d799481ab2272e2cae0f3a2e (diff) | |
download | tcl-e8a88320e534c01ce8047b879b5735c77ae8e115.zip tcl-e8a88320e534c01ce8047b879b5735c77ae8e115.tar.gz tcl-e8a88320e534c01ce8047b879b5735c77ae8e115.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].
FossilOrigin-Name: de416fc6a1b6683a9fc6eea13efbd87810d07056
Diffstat (limited to 'generic/tclStringObj.c')
-rw-r--r-- | generic/tclStringObj.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index ab04253..73aec31 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.32.2.2 2006/09/24 21:15:11 msofer Exp $ */ + * RCS: @(#) $Id: tclStringObj.c,v 1.32.2.3 2009/01/08 17:57:32 dgp Exp $ */ #include "tclInt.h" @@ -104,7 +104,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) \ |