printf: fix a trivial bug

diff --git a/coreutils/printf.c b/coreutils/printf.c
index cd18495..ebe9615 100644
--- a/coreutils/printf.c
+++ b/coreutils/printf.c
@@ -116,7 +116,7 @@
 	saved = format[fmt_length];
 	format[fmt_length] = '\0';
 
-	switch (p[fmt_length - 1]) {
+	switch (format[fmt_length - 1]) {
 	case 'd':
 	case 'i':
 		if (field_width < 0) {