Index: uspace/lib/c/generic/io/printf_core.c
===================================================================
--- uspace/lib/c/generic/io/printf_core.c	(revision ab9f443226bf5802fcaacccd852f8b4a0ff582bd)
+++ 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;
 	
