]> pd.if.org Git - pdclib/blobdiff - functions/stdlib/strtoull.c
Intermediate work, checked in for safekeeping as I pick up working on this again.
[pdclib] / functions / stdlib / strtoull.c
index de48b0f698869970aa75b9eac199c2ee1e35fad9..b4204e91bac79e1fb78e96159f70c0fb647ea1f1 100644 (file)
@@ -19,7 +19,7 @@ unsigned long long int strtoull( 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)ULLONG_MAX, (uintmax_t)( ULLONG_MAX / base ), (uintmax_t)( ULLONG_MAX % base ), &sign );
+    rc = _PDCLIB_strtox_main( &p, (unsigned)base, (uintmax_t)ULLONG_MAX, (uintmax_t)( ULLONG_MAX / base ), (int)( ULLONG_MAX % base ), &sign );
     if ( endptr != NULL ) *endptr = ( p != NULL ) ? (char *) p : (char *) s;
     return ( sign == '+' ) ? rc : -rc;
 }