mirror of
https://github.com/xcat2/xNBA.git
synced 2024-12-14 07:11:32 +00:00
Catch attempts to print NULL strings
This commit is contained in:
parent
1bc3514bd8
commit
19e1d674d3
@ -219,6 +219,8 @@ size_t vcprintf ( struct printf_context *ctx, const char *fmt, va_list args ) {
|
||||
cputchar ( ctx, va_arg ( args, unsigned int ) );
|
||||
} else if ( *fmt == 's' ) {
|
||||
ptr = va_arg ( args, char * );
|
||||
if ( ! ptr )
|
||||
ptr = "<NULL>";
|
||||
} else if ( *fmt == 'p' ) {
|
||||
intptr_t ptrval;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user