Explorar o código

minor perror behavior fix

patch by nsz
Rich Felker %!s(int64=12) %!d(string=hai) anos
pai
achega
82a4499e67
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/stdio/perror.c

+ 1 - 1
src/stdio/perror.c

@@ -10,7 +10,7 @@ void perror(const char *msg)
 
 	FLOCK(f);
 	
-	if (msg) {
+	if (msg && *msg) {
 		fwrite(msg, strlen(msg), 1, f);
 		fputc(':', f);
 		fputc(' ', f);