summaryrefslogtreecommitdiff
path: root/pcre32_utf32_utils.c
diff options
context:
space:
mode:
authorchpe <chpe@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-10-18 19:08:14 +0000
committerchpe <chpe@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-10-18 19:08:14 +0000
commit5e6981e6bf590699b5263f543d22302409a99d14 (patch)
tree899fd1b648c0091280d35c334c5285d5d694aee8 /pcre32_utf32_utils.c
parent4c27fd09086cf58d89e56b01fa5e7b802e6d2386 (diff)
downloadpcre-5e6981e6bf590699b5263f543d22302409a99d14.tar.gz
Fix some sign-conversion warnings
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1138 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre32_utf32_utils.c')
-rw-r--r--pcre32_utf32_utils.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/pcre32_utf32_utils.c b/pcre32_utf32_utils.c
index 971c333..4c51a00 100644
--- a/pcre32_utf32_utils.c
+++ b/pcre32_utf32_utils.c
@@ -105,8 +105,9 @@ const pcre_uchar *end;
register pcre_uchar c;
if (length < 0)
- length = STRLEN_UC(iptr) + 1;
-end = iptr + length;
+ end = iptr + STRLEN_UC(iptr) + 1;
+else
+ end = iptr + length;
while (iptr < end)
{
@@ -118,8 +119,6 @@ while (iptr < end)
host_bo = c == 0x0000feffu;
if (keep_boms != 0)
*optr++ = 0x0000feffu;
- else
- length--;
}
else
*optr++ = host_bo ? c : swap_uint32(c);