Skip to content

Commit 021a392

Browse files
committed
add edge case
1 parent bae6310 commit 021a392

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

0x10-variadic_functions/3-print_all.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void print_all(const char * const format, ...)
8383
va_list ptr;
8484

8585
va_start(ptr, format);
86-
while (format[index] != '\0')
86+
while (format && format[index] != '\0')
8787
{
8888
while (formats[index2].type != NULL)
8989
{

0 commit comments

Comments
 (0)