Fix two instances of <= 0 being applied to unsigned integers.

This commit is contained in:
Philip.Hazel 2018-11-17 16:59:39 +00:00
parent 24b592ed00
commit cd73c9319e
3 changed files with 5 additions and 2 deletions

View File

@ -77,6 +77,9 @@ modifiers.
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
-------------------------------

View File

@ -276,7 +276,7 @@ while (plength > 0)
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)

View File

@ -435,7 +435,7 @@ do
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;