This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
The tr utf8 patching continues.
authorSimon Cozens <simon@netthink.co.uk>
Wed, 2 Aug 2000 02:37:17 +0000 (02:37 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 2 Aug 2000 13:34:36 +0000 (13:34 +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