]> pd.if.org Git - pdclib/commitdiff
_PDCLIB_scan: Correct INT_MAX -> UINT_MAX when initializing width
authorOwen Shepherd <owen.shepherd@e43.eu>
Wed, 26 Dec 2012 19:45:24 +0000 (19:45 +0000)
committerOwen Shepherd <owen.shepherd@e43.eu>
Wed, 26 Dec 2012 19:45:24 +0000 (19:45 +0000)
vfprintf: Correct SIZE_MAX -> UINT_MAX when initializing width

functions/_PDCLIB/scan.c
functions/stdio/vfprintf.c

index 7e6c42c4c53c12e2d1e22e1a98b38b73508e05c1..0ecf31ada2393ff94d5d058cef7f75dfa07f563b 100644 (file)
@@ -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
index ffb4bbe6e49794509ccf20d018e924e22d0ac22c..18e9c4b524919abbcce8c002d111a6120699d2ff 100644 (file)
@@ -9,6 +9,7 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <stdint.h>
+#include <limits.h>
 
 #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;