summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doop.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/doop.c b/doop.c
index 013991128f..ba8a7e5ceb 100644
--- a/doop.c
+++ b/doop.c
@@ -23,12 +23,14 @@
#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