diff Objects/unicodeobject.c @ 31456:566737bfaec9 2.3

Backport checkin: Fix reallocation bug in unicode.translate(): The code was comparing characters instead of character pointers to determine space requirements.
author Walter Dörwald <walter@livinglogic.de>
date Thu, 05 Feb 2004 17:44:26 +0000
parents 982e3e40bf1e
children 4ecf16624498
line wrap: on
line diff
--- a/Objects/unicodeobject.c	Wed Feb 04 23:13:43 2004 +0000
+++ b/Objects/unicodeobject.c	Thu Feb 05 17:44:26 2004 +0000
@@ -3271,7 +3271,7 @@
 	else if (repsize!=0) {
 	    /* more than one character */
 	    int requiredsize = (*outp-PyUnicode_AS_UNICODE(*outobj)) +
-		(insize - (*curinp-*startinp)) +
+		(insize - (curinp-startinp)) +
 		repsize - 1;
 	    if (charmaptranslate_makespace(outobj, outp, requiredsize))
 		return -1;