BSD 4_4_Lite2 release
[unix-history] / usr / src / usr.bin / tr / str.c
index f86493a..367e1b1 100644 (file)
@@ -32,7 +32,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)str.c      8.1 (Berkeley) 6/6/93";
+static char sccsid[] = "@(#)str.c      8.2 (Berkeley) 4/28/95";
 #endif /* not lint */
 
 #include <sys/cdefs.h>
 #endif /* not lint */
 
 #include <sys/cdefs.h>
@@ -241,8 +241,8 @@ genrange(s)
        char *savestart;
 
        savestart = s->str;
        char *savestart;
 
        savestart = s->str;
-       stopval = *++s->str == '\\' ? backslash(s) : *s->str;
-       if (stopval < s->lastch) {
+       stopval = *++s->str == '\\' ? backslash(s) : *s->str++;
+       if (stopval < (u_char)s->lastch) {
                s->str = savestart;
                return (0);
        }
                s->str = savestart;
                return (0);
        }