Skip to content

Commit 3e98688

Browse files
authored
Add a few extra lines to set erroroffset for consistency
1 parent eff1081 commit 3e98688

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

maint/FilterCoverage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,4 +268,4 @@ def filter_lcov(in_fh, out_fh):
268268
with open(sys.argv[1], "r", encoding="utf-8") as fh:
269269
filter_lcov(fh, sys.stdout)
270270
else:
271-
filter_lcov(sys.stdin, sys.stdout)
271+
filter_lcov(sys.stdin, sys.stdout)

src/pcre2_compile.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6168,6 +6168,8 @@ for (;; pptr++)
61686168
{
61696169
PCRE2_DEBUG_UNREACHABLE();
61706170
*errorcodeptr = ERR52; /* Over-ran workspace - internal error */
6171+
cb->erroroffset = 0;
6172+
return 0;
61716173
}
61726174
/* LCOV_EXCL_STOP */
61736175

@@ -10972,6 +10974,7 @@ if (usedlength > length)
1097210974
{
1097310975
PCRE2_DEBUG_UNREACHABLE();
1097410976
errorcode = ERR23; /* Overflow of code block - internal error */
10977+
cb.erroroffset = 0;
1097510978
goto HAD_CB_ERROR;
1097610979
}
1097710980
/* LCOV_EXCL_STOP */
@@ -11068,6 +11071,7 @@ if (errorcode == 0 && (optim_flags & PCRE2_OPTIM_AUTO_POSSESS) != 0)
1106811071
{
1106911072
PCRE2_DEBUG_UNREACHABLE();
1107011073
errorcode = ERR80;
11074+
cb.erroroffset = 0;
1107111075
}
1107211076
/* LCOV_EXCL_STOP */
1107311077
}
@@ -11229,6 +11233,7 @@ if ((optim_flags & PCRE2_OPTIM_START_OPTIMIZE) != 0)
1122911233
{
1123011234
PCRE2_DEBUG_UNREACHABLE();
1123111235
errorcode = ERR31;
11236+
cb.erroroffset = 0;
1123211237
goto HAD_CB_ERROR;
1123311238
}
1123411239
/* LCOV_EXCL_STOP */

0 commit comments

Comments
 (0)