changeset 10250:422c3b96efda

(set_search_regs): Really set search_regs.start and .end. (save_search_regs): Set them to 0 here.
author Richard M. Stallman <rms@gnu.org>
date Sun, 25 Dec 1994 21:15:07 +0000
parents a664a948dd55
children bf1c7dcc69db
files src/search.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/search.c	Sun Dec 25 21:14:46 1994 +0000
+++ b/src/search.c	Sun Dec 25 21:15:07 1994 +0000
@@ -1309,10 +1309,8 @@
      the match position.  */
   if (search_regs.num_regs == 0)
     {
-      regoff_t *starts, *ends;
-
-      starts = (regoff_t *) xmalloc (2 * sizeof (regoff_t));
-      ends = (regoff_t *) xmalloc (2 * sizeof (regoff_t));
+      search_regs.start = (regoff_t *) xmalloc (2 * sizeof (regoff_t));
+      search_regs.end = (regoff_t *) xmalloc (2 * sizeof (regoff_t));
       search_regs.num_regs = 2;
     }
 
@@ -1941,6 +1939,8 @@
       saved_search_regs.start = search_regs.start;
       saved_search_regs.end = search_regs.end;
       search_regs.num_regs = 0;
+      search_regs.start = 0;
+      search_regs.end = 0;
 
       search_regs_saved = 1;
     }