Commit 9b9ceb61 authored by David Kastrup's avatar David Kastrup
Browse files

(match_limit): Don't flag an error if match-data

exceeding the allocated search_regs.num_regs gets requested, just
return Qnil.
parent 9fc2be4c
2004-06-11 David Kastrup <dak@gnu.org>
* search.c (match_limit): Don't flag an error if match-data
exceeding the allocated search_regs.num_regs gets requested, just
return Qnil.
2004-06-08 Miles Bader <miles@gnu.org> 2004-06-08 Miles Bader <miles@gnu.org>
* xfaces.c (push_named_merge_point): Return 0 when a cycle is detected. * xfaces.c (push_named_merge_point): Return 0 when a cycle is detected.
......
...@@ -2622,9 +2622,9 @@ match_limit (num, beginningp) ...@@ -2622,9 +2622,9 @@ match_limit (num, beginningp)
CHECK_NUMBER (num); CHECK_NUMBER (num);
n = XINT (num); n = XINT (num);
if (n < 0 || n >= search_regs.num_regs) if (n < 0 || search_regs.num_regs <= 0)
args_out_of_range (num, make_number (search_regs.num_regs)); args_out_of_range (num, make_number (search_regs.num_regs));
if (search_regs.num_regs <= 0 if (n >= search_regs.num_regs
|| search_regs.start[n] < 0) || search_regs.start[n] < 0)
return Qnil; return Qnil;
return (make_number ((beginningp) ? search_regs.start[n] return (make_number ((beginningp) ? search_regs.start[n]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment