From: Owen Shepherd Date: Wed, 26 Dec 2012 19:45:24 +0000 (+0000) Subject: _PDCLIB_scan: Correct INT_MAX -> UINT_MAX when initializing width X-Git-Url: https://pd.if.org/git/?p=pdclib;a=commitdiff_plain;h=0cf5cdb61dae0e9ce894115ef69b79d8b2507d54 _PDCLIB_scan: Correct INT_MAX -> UINT_MAX when initializing width vfprintf: Correct SIZE_MAX -> UINT_MAX when initializing width --- diff --git a/functions/_PDCLIB/scan.c b/functions/_PDCLIB/scan.c index 7e6c42c..0ecf31a 100644 --- a/functions/_PDCLIB/scan.c +++ b/functions/_PDCLIB/scan.c @@ -162,7 +162,7 @@ const char * _PDCLIB_scan( const char * spec, struct _PDCLIB_status_t * status ) status->width = (int)strtol( spec, (char**)&spec, 10 ); if ( spec == prev_spec ) { - status->width = INT_MAX; + status->width = UINT_MAX; } /* Optional length modifier diff --git a/functions/stdio/vfprintf.c b/functions/stdio/vfprintf.c index ffb4bbe..18e9c4b 100644 --- a/functions/stdio/vfprintf.c +++ b/functions/stdio/vfprintf.c @@ -9,6 +9,7 @@ #include #include #include +#include #ifndef REGTEST @@ -20,7 +21,7 @@ int vfprintf_unlocked( struct _PDCLIB_file_t * _PDCLIB_restrict stream, struct _PDCLIB_status_t status; status.base = 0; status.flags = 0; - status.n = SIZE_MAX; + status.n = UINT_MAX; status.i = 0; status.current = 0; status.s = NULL;