svn commit: branches/busybox_1_13_stable/coreutils

vda at busybox.net vda at busybox.net
Wed Mar 4 01:30:33 UTC 2009


Author: vda
Date: 2009-03-04 01:30:32 +0000 (Wed, 04 Mar 2009)
New Revision: 25517

Log:
printf: fix breakage in handling '*'



Modified:
   branches/busybox_1_13_stable/coreutils/printf.c


Changeset:
Modified: branches/busybox_1_13_stable/coreutils/printf.c
===================================================================
--- branches/busybox_1_13_stable/coreutils/printf.c	2009-03-03 22:28:15 UTC (rev 25516)
+++ branches/busybox_1_13_stable/coreutils/printf.c	2009-03-04 01:30:32 UTC (rev 25517)
@@ -139,14 +139,14 @@
 	char saved;
 	char *have_prec, *have_width;
 
+	saved = format[fmt_length];
+	format[fmt_length] = '\0';
+
 	have_prec = strstr(format, ".*");
 	have_width = strchr(format, '*');
 	if (have_width - 1 == have_prec)
 		have_width = NULL;
 
-	saved = format[fmt_length];
-	format[fmt_length] = '\0';
-
 	switch (format[fmt_length - 1]) {
 	case 'c':
 		printf(format, *argument);



More information about the busybox-cvs mailing list