[BusyBox] Small buglet in vi if CONFIG_VI_FEATURE_CRASHME

Jim Treadway jim at stardot-tech.com
Tue Dec 3 13:39:04 UTC 2002


Untested, but this should be correct (this crept in a while back -- the 
statement used to be a sprintf() + write() pair).

		Jim


Index: editors/vi.c
===================================================================
RCS file: /var/cvs/busybox/editors/vi.c,v
retrieving revision 1.26
diff -u -r1.26 vi.c
--- editors/vi.c	2 Dec 2002 21:18:08 -0000	1.26
+++ editors/vi.c	3 Dec 2002 20:34:40 -0000
@@ -3975,8 +3975,8 @@
 
 	if (strlen(msg) > 0) {
 		alarm(0);
-		printf(buf, "\n\n%d: \'%c\' %s\n\n\n%s[Hit return to continue]%s",
-			totalcmds, last_input_char, msg, SOs, SOn);
+		printf("\n\n%d: \'%c\' %s\n\n\n%s[Hit return to continue]%s",
+		       totalcmds, last_input_char, msg, SOs, SOn);
 		fflush(stdout);
 		while (read(0, d, 1) > 0) {
 			if (d[0] == '\n' || d[0] == '\r')




More information about the busybox mailing list