(match_limit): Don't flag an error if match-data
exceeding the allocated search_regs.num_regs gets requested, just return Qnil.
This commit is contained in:
parent
9fc2be4c21
commit
9b9ceb6178
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
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>
|
||||
|
||||
* xfaces.c (push_named_merge_point): Return 0 when a cycle is detected.
|
||||
|
|
|
@ -2622,9 +2622,9 @@ match_limit (num, beginningp)
|
|||
|
||||
CHECK_NUMBER (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));
|
||||
if (search_regs.num_regs <= 0
|
||||
if (n >= search_regs.num_regs
|
||||
|| search_regs.start[n] < 0)
|
||||
return Qnil;
|
||||
return (make_number ((beginningp) ? search_regs.start[n]
|
||||
|
|
Loading…
Add table
Reference in a new issue