Index: uspace/app/tester/print/print1.c
===================================================================
--- uspace/app/tester/print/print1.c	(revision 64846020196dc6d7df55370e22747216c5237afc)
+++ uspace/app/tester/print/print1.c	(revision 94f6df78dd46b93498ccd44f24c2a40a3dbaa74a)
@@ -42,5 +42,5 @@
 	
 	TPRINTF("Testing printf(\"%%8.10s\", \"text\"):\n");
-	TPRINTF("Expected output: \"text\"\n");
+	TPRINTF("Expected output: \"    text\"\n");
 	TPRINTF("Real output:     \"%8.10s\"\n\n", "text");
 	
@@ -49,4 +49,8 @@
 	TPRINTF("Real output:     \"%8.10s\"\n\n", "very long text");
 	
+	TPRINTF("Testing printf(\"%%-*.*s\", 7, 7, \"text\"):\n");
+	TPRINTF("Expected output: \"text   \"\n");
+	TPRINTF("Real output:     \"%-*.*s\"\n\n", 7, 7, "text");
+	
 	return NULL;
 }
Index: uspace/lib/c/generic/io/printf_core.c
===================================================================
--- uspace/lib/c/generic/io/printf_core.c	(revision 64846020196dc6d7df55370e22747216c5237afc)
+++ uspace/lib/c/generic/io/printf_core.c	(revision 94f6df78dd46b93498ccd44f24c2a40a3dbaa74a)
@@ -283,5 +283,5 @@
 	/* Print leading spaces. */
 	size_t strw = str_length(str);
-	if (precision == 0)
+	if (precision == 0 || precision > strw)
 		precision = strw;
 	
@@ -331,5 +331,5 @@
 	/* Print leading spaces. */
 	size_t strw = wstr_length(str);
-	if (precision == 0)
+	if (precision == 0 || precision > strw)
 		precision = strw;
 	
