changeset 18112:fa7208c8ac02

(search_buffer): Use XINT around refs to trt.
author Richard M. Stallman <rms@gnu.org>
date Mon, 02 Jun 1997 02:19:29 +0000
parents 4bd5e5e3db42
children 9f7fdb0f76f3
files src/search.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/search.c	Mon Jun 02 00:56:23 1997 +0000
+++ b/src/search.c	Mon Jun 02 02:19:29 1997 +0000
@@ -944,7 +944,7 @@
 		len--;
 		base_pat++;
 	      }
-	    *pat++ = (trt ? trt[*base_pat++] : *base_pat++);
+	    *pat++ = (trt ? XINT (trt[*base_pat++]) : *base_pat++);
 	  }
 	len = pat - patbuf;
 	pat = base_pat = patbuf;
@@ -999,13 +999,13 @@
 	  if (i == dirlen) i = infinity;
 	  if (trt != 0)
 	    {
-	      k = (j = trt[j]);
+	      k = (j = XINT (trt[j]));
 	      if (i == infinity)
 		stride_for_teases = BM_tab[j];
 	      BM_tab[j] = dirlen - i;
 	      /* A translation table is accompanied by its inverse -- see */
 	      /* comment following downcase_table for details */ 
-	      while ((j = (unsigned char) inverse_trt[j]) != k)
+	      while ((j = (unsigned char) XINT (inverse_trt[j])) != k)
 		BM_tab[j] = dirlen - i;
 	    }
 	  else
@@ -1088,7 +1088,7 @@
 		  if (trt != 0)
 		    {
 		      while ((i -= direction) + direction != 0)
-			if (pat[i] != trt[*(cursor -= direction)])
+			if (pat[i] != XINT (trt[*(cursor -= direction)]))
 			  break;
 		    }
 		  else
@@ -1149,7 +1149,7 @@
 		    {
 		      pos -= direction;
 		      if (pat[i] != (trt != 0
-				     ? trt[FETCH_BYTE (pos)]
+				     ? XINT (trt[FETCH_BYTE (pos)])
 				     : FETCH_BYTE (pos)))
 			break;
 		    }