X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=Usermode%2FLibraries%2Flibc.so_src%2Fprintf.c;h=1b61cba85175df614bcda571c3cfa3b681c1a522;hb=49e5712c717c8960e12097e976335ed955e6cd50;hp=bf07de4177b4d312e0fc1cc3fa6d5a2f0550a11b;hpb=97ffc5b9d7f8575fae3905ba4a76eca63b14179c;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/libc.so_src/printf.c b/Usermode/Libraries/libc.so_src/printf.c index bf07de41..1b61cba8 100644 --- a/Usermode/Libraries/libc.so_src/printf.c +++ b/Usermode/Libraries/libc.so_src/printf.c @@ -1,4 +1,4 @@ -/* +#include /* * Acess2 C Library * - By John Hodge (thePowersGang) * @@ -200,7 +200,7 @@ EXPORT int _vcprintf_int(printf_putch_t putch_cb, void *putch_h, const char *for _addchar('0'); _addchar(c); } - arg = bLongLong ? va_arg(args, int64_t) : va_arg(args, int32_t); + arg = bLongLong ? va_arg(args, uint64_t) : va_arg(args, uint32_t); pos += _printf_itoa(putch_cb, putch_h, arg, 16, c=='X', FALSE, '\0', precision, minSize,cNumPad,bJustifyLeft); break; @@ -473,13 +473,13 @@ int expand_double(double num, uint64_t *Significand, int16_t *Exponent, int *Sig // printf("%llx %i %i %llx\n", *bit_rep, (int)*SignIsNeg, (int)*Exponent, *Significand); // Subnormals - if( *Exponent == -1023 && *Significand != 0 ) + if( *Exponent == -0x3FF && *Significand != 0 ) return 1; // Infinity - if( *Exponent == 0x800 && *Significand == 0) + if( *Exponent == 0x400 && *Significand == 0) return 2; // NaNs - if( *Exponent == 0x800 && *Significand != 0) + if( *Exponent == 0x400 && *Significand != 0) return 3; return 0;