The tr utf8 patching continues.
Simon Cozens [Wed, 2 Aug 2000 02:37:17 +0000 (02:37 +0000)]
Subject: Re: #6469, too many tests claimed in require.t
Message-ID: <slrn8of2at.81o.simon@justanother.perlhacker.org>

(the logic of the test was the wrong way round in the patch)

p4raw-id: //depot/perl@6491

doop.c

diff --git a/doop.c b/doop.c
index 0139911..ba8a7e5 100644 (file)
--- a/doop.c
+++ b/doop.c
 
 #define HALF_UTF8_UPGRADE(start,end) \
     STMT_START {                               \
+      if ((start)<(end)) {                     \
        U8* NeWsTr;                             \
        STRLEN LeN = (end) - (start);           \
        NeWsTr = bytes_to_utf8(start, &LeN);    \
        Safefree(start);                        \
        (start) = NeWsTr;                       \
        (end) = (start) + LeN;                  \
+      }                                                \
     } STMT_END
 
 STATIC I32