diff options
Diffstat (limited to 'src/search.c')
-rw-r--r-- | src/search.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/search.c b/src/search.c index 07ff0e47643..a450e920b03 100644 --- a/src/search.c +++ b/src/search.c @@ -319,7 +319,10 @@ looking_at_1 (Lisp_Object string, bool posix) ZV_BYTE - BEGV_BYTE); if (i == -2) - matcher_overflow (); + { + unbind_to (count, Qnil); + matcher_overflow (); + } val = (i >= 0 ? Qt : Qnil); if (preserve_match_data && i >= 0) @@ -1198,6 +1201,7 @@ search_buffer_re (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte, pos_byte - BEGV_BYTE); if (val == -2) { + unbind_to (count, Qnil); matcher_overflow (); } if (val >= 0) @@ -1243,6 +1247,7 @@ search_buffer_re (Lisp_Object string, ptrdiff_t pos, ptrdiff_t pos_byte, lim_byte - BEGV_BYTE); if (val == -2) { + unbind_to (count, Qnil); matcher_overflow (); } if (val >= 0) |