Change 14085 by jhi@alpha on 2002/01/04 23:36:23
Apparently in some cases the extra \0 byte is good.
Affected files ...
.... //depot/perl/pp.c#326 edit
Differences ...
==== //depot/perl/pp.c#326 (text) ====
Index: perl/pp.c
--- perl/pp.c.~1~ Fri Jan 4 16:45:05 2002
+++ perl/pp.c Fri Jan 4 16:45:05 2002
@@ -3180,12 +3180,12 @@
char *tmps = SvPV(left, len);
char *t = 0;
if (DO_UTF8(left)) {
- /* If Unicode take the crypt() of the low 8 bits
- * of the characters of the string. */
+ /* If Unicode take the crypt() of the low 8 bits of
+ * the characters of the string. Yes, we made this up. */
char *s = tmps;
char *send = tmps + len;
STRLEN i = 0;
- Newz(688, t, len, char);
+ Newz(688, t, len + 1, char);
while (s < send) {
t[i++] = utf8_to_uvchr((U8*)s, 0) & 0xFF;
s += UTF8SKIP(s);
End of Patch.