Revision: 1044
http://www.exim.org/viewvc/pcre2?view=rev&revision=1044
Author: ph10
Date: 2018-11-17 16:59:39 +0000 (Sat, 17 Nov 2018)
Log Message:
-----------
Fix two instances of <= 0 being applied to unsigned integers.
Modified Paths:
--------------
code/trunk/ChangeLog
code/trunk/src/pcre2_convert.c
code/trunk/src/pcre2_substitute.c
Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog 2018-11-17 16:49:28 UTC (rev 1043)
+++ code/trunk/ChangeLog 2018-11-17 16:59:39 UTC (rev 1044)
@@ -77,7 +77,10 @@
in pcre2grep to the inbuilt echo facility. This may be useful in environments
that do not support fork().
+19. Fix two instances of <= 0 being applied to unsigned integers (the VMS
+compiler complains).
+
Version 10.32 10-September-2018
-------------------------------
Modified: code/trunk/src/pcre2_convert.c
===================================================================
--- code/trunk/src/pcre2_convert.c 2018-11-17 16:49:28 UTC (rev 1043)
+++ code/trunk/src/pcre2_convert.c 2018-11-17 16:59:39 UTC (rev 1044)
@@ -276,7 +276,7 @@
break;
case CHAR_BACKSLASH:
- if (plength <= 0) return PCRE2_ERROR_END_BACKSLASH;
+ if (plength == 0) return PCRE2_ERROR_END_BACKSLASH;
if (extended) nextisliteral = TRUE; else
{
if (*posix < 127 && strchr(posix_meta_escapes, *posix) != NULL)
Modified: code/trunk/src/pcre2_substitute.c
===================================================================
--- code/trunk/src/pcre2_substitute.c 2018-11-17 16:49:28 UTC (rev 1043)
+++ code/trunk/src/pcre2_substitute.c 2018-11-17 16:59:39 UTC (rev 1044)
@@ -435,7 +435,7 @@
if (ptr >= repend)
{
- if (ptrstackptr <= 0) break; /* End of replacement string */
+ if (ptrstackptr == 0) break; /* End of replacement string */
repend = ptrstack[--ptrstackptr];
ptr = ptrstack[--ptrstackptr];
continue;