X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fstdlib%2Fstrtoull.c;h=b4204e91bac79e1fb78e96159f70c0fb647ea1f1;hp=de48b0f698869970aa75b9eac199c2ee1e35fad9;hb=f93d55176e4db9edfb1840054169003bcca4d1fb;hpb=48ec56a384a70f2d7b1293db192e37f6dfaabe1e diff --git a/functions/stdlib/strtoull.c b/functions/stdlib/strtoull.c index de48b0f..b4204e9 100644 --- a/functions/stdlib/strtoull.c +++ b/functions/stdlib/strtoull.c @@ -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; }