]> pd.if.org Git - pdclib/blobdiff - functions/stdlib/strtoul.c
Merged branch stdio_rewrite back into trunk.
[pdclib] / functions / stdlib / strtoul.c
index 68f790af7a44fff289c9482d2ac6e31b1f997198..7bd8488feaae1cc80932d2b71ec98c232f27f205 100644 (file)
@@ -19,7 +19,7 @@ unsigned long int strtoul( const char * s, char ** endptr, int base )
     char sign = '+';
     const char * p = _PDCLIB_strtox_prelim( s, &sign, &base );
     if ( base < 2 || base > 36 ) return 0;
-    rc = _PDCLIB_strtox_main( &p, (unsigned)base, (uintmax_t)ULONG_MAX, (uintmax_t)( ULONG_MAX / base ), (int)( ULONG_MAX % base ), &sign );
+    rc = (unsigned long int)_PDCLIB_strtox_main( &p, (unsigned)base, (uintmax_t)ULONG_MAX, (uintmax_t)( ULONG_MAX / base ), (int)( ULONG_MAX % base ), &sign );
     if ( endptr != NULL ) *endptr = ( p != NULL ) ? (char *) p : (char *) s;
     return ( sign == '+' ) ? rc : -rc;
 }