BSD 4_4_Lite2 release
[unix-history] / usr / src / usr.bin / printf / printf.c
index 69f0c8e..82ffbda 100644 (file)
@@ -40,7 +40,7 @@ static char copyright[] =
 #endif
 
 #ifndef lint
 #endif
 
 #ifndef lint
-static char sccsid[] = "@(#)printf.c   8.1 (Berkeley) 7/20/93";
+static char sccsid[] = "@(#)printf.c   8.2 (Berkeley) 3/22/95";
 #endif /* not lint */
 
 #include <sys/types.h>
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -258,7 +258,7 @@ escape(fmt)
        register char *store;
        register int value, c;
 
        register char *store;
        register int value, c;
 
-       for (store = fmt; c = *fmt; ++fmt, ++store) {
+       for (store = fmt; (c = *fmt) != '\0'; ++fmt, ++store) {
                if (c != '\\') {
                        *store = c;
                        continue;
                if (c != '\\') {
                        *store = c;
                        continue;