Mercurial > emacs
changeset 33052:9ec478daa468
(Fset_match_data): Be sure to make search_regs always sane.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Mon, 30 Oct 2000 04:10:22 +0000 |
parents | d1e7886acdb7 |
children | eb3d446c4a6e |
files | src/search.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/search.c Mon Oct 30 04:10:07 2000 +0000 +++ b/src/search.c Mon Oct 30 04:10:22 2000 +0000 @@ -2746,6 +2746,9 @@ length * sizeof (regoff_t)); } + for (i = search_regs.num_regs; i < length; i++) + search_regs.start[i] = -1; + search_regs.num_regs = length; } } @@ -2760,6 +2763,8 @@ } else { + int from; + if (MARKERP (marker)) { if (XMARKER (marker)->buffer == 0) @@ -2769,7 +2774,7 @@ } CHECK_NUMBER_COERCE_MARKER (marker, 0); - search_regs.start[i] = XINT (marker); + from = XINT (marker); list = Fcdr (list); marker = Fcar (list); @@ -2777,6 +2782,7 @@ XSETFASTINT (marker, 0); CHECK_NUMBER_COERCE_MARKER (marker, 0); + search_regs.start[i] = from; search_regs.end[i] = XINT (marker); } list = Fcdr (list);