]> 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 929a96c3699c60a1686bde7cb9bc9ddab1733f5d..b4204e91bac79e1fb78e96159f70c0fb647ea1f1 100644 (file)
@@ -1,7 +1,5 @@
 /* $Id$ */
 
-/* Release $Name$ */
-
 /* strtoull( const char *, char * *, int )
 
    This file is part of the Public Domain C Library (PDCLib).
@@ -21,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;
 }