Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/code/handmade_shared.h b/code/handmade_shared.h
- index 3e0a9e8..04202b9 100644
- --- a/code/handmade_shared.h
- +++ b/code/handmade_shared.h
- @@ -174,29 +174,29 @@ OutChars(format_dest *Dest, char *Value)
- }
- inline u64
- -ReadVarArgUnsignedInteger(u32 Length, va_list *ArgList)
- +ReadVarArgUnsignedInteger(u32 Length, va_list ArgList)
- {
- u64 Result = 0;
- switch(Length)
- {
- case 1:
- {
- - Result = va_arg(*ArgList, u8);
- + Result = va_arg(ArgList, u32);
- } break;
- case 2:
- {
- - Result = va_arg(*ArgList, u16);
- + Result = va_arg(ArgList, u32);
- } break;
- case 4:
- {
- - Result = va_arg(*ArgList, u32);
- + Result = va_arg(ArgList, u32);
- } break;
- case 8:
- {
- - Result = va_arg(*ArgList, u64);
- + Result = va_arg(ArgList, u64);
- } break;
- }
- @@ -204,7 +204,7 @@ ReadVarArgUnsignedInteger(u32 Length, va_list *ArgList)
- }
- inline s64
- -ReadVarArgSignedInteger(u32 Length, va_list *ArgList)
- +ReadVarArgSignedInteger(u32 Length, va_list ArgList)
- {
- u64 Temp = ReadVarArgUnsignedInteger(Length, ArgList);
- s64 Result = *(s64 *)&Temp;
- @@ -212,19 +212,19 @@ ReadVarArgSignedInteger(u32 Length, va_list *ArgList)
- }
- inline f64
- -ReadVarArgFloat(u32 Length, va_list *ArgList)
- +ReadVarArgFloat(u32 Length, va_list ArgList)
- {
- f64 Result = 0;
- switch(Length)
- {
- case 4:
- {
- - Result = va_arg(*ArgList, f32);
- + Result = va_arg(ArgList, f64);
- } break;
- case 8:
- {
- - Result = va_arg(*ArgList, f64);
- + Result = va_arg(ArgList, f64);
- } break;
- }
- @@ -385,7 +385,7 @@ FormatStringList(umm DestSize, char *DestInit, char *Format, va_list ArgList)
- case 'd':
- case 'i':
- {
- - s64 Value = ReadVarArgSignedInteger(IntegerLength, &ArgList);
- + s64 Value = ReadVarArgSignedInteger(IntegerLength, ArgList);
- b32 WasNegative = (Value < 0);
- if(WasNegative)
- {
- @@ -412,13 +412,13 @@ FormatStringList(umm DestSize, char *DestInit, char *Format, va_list ArgList)
- case 'u':
- {
- - u64 Value = ReadVarArgUnsignedInteger(IntegerLength, &ArgList);
- + u64 Value = ReadVarArgUnsignedInteger(IntegerLength, ArgList);
- U64ToASCII(&TempDest, Value, 10, DecChars);
- } break;
- case 'o':
- {
- - u64 Value = ReadVarArgUnsignedInteger(IntegerLength, &ArgList);
- + u64 Value = ReadVarArgUnsignedInteger(IntegerLength, ArgList);
- U64ToASCII(&TempDest, Value, 8, DecChars);
- if(AnnotateIfNotZero && (Value != 0))
- {
- @@ -428,7 +428,7 @@ FormatStringList(umm DestSize, char *DestInit, char *Format, va_list ArgList)
- case 'x':
- {
- - u64 Value = ReadVarArgUnsignedInteger(IntegerLength, &ArgList);
- + u64 Value = ReadVarArgUnsignedInteger(IntegerLength, ArgList);
- U64ToASCII(&TempDest, Value, 16, LowerHexChars);
- if(AnnotateIfNotZero && (Value != 0))
- {
- @@ -438,7 +438,7 @@ FormatStringList(umm DestSize, char *DestInit, char *Format, va_list ArgList)
- case 'X':
- {
- - u64 Value = ReadVarArgUnsignedInteger(IntegerLength, &ArgList);
- + u64 Value = ReadVarArgUnsignedInteger(IntegerLength, ArgList);
- U64ToASCII(&TempDest, Value, 16, UpperHexChars);
- if(AnnotateIfNotZero && (Value != 0))
- {
- @@ -448,42 +448,42 @@ FormatStringList(umm DestSize, char *DestInit, char *Format, va_list ArgList)
- case 'f':
- {
- - f64 Value = ReadVarArgFloat(FloatLength, &ArgList);
- + f64 Value = ReadVarArgFloat(FloatLength, ArgList);
- } break;
- case 'F':
- {
- - f64 Value = ReadVarArgFloat(FloatLength, &ArgList);
- + f64 Value = ReadVarArgFloat(FloatLength, ArgList);
- } break;
- case 'e':
- {
- - f64 Value = ReadVarArgFloat(FloatLength, &ArgList);
- + f64 Value = ReadVarArgFloat(FloatLength, ArgList);
- } break;
- case 'E':
- {
- - f64 Value = ReadVarArgFloat(FloatLength, &ArgList);
- + f64 Value = ReadVarArgFloat(FloatLength, ArgList);
- } break;
- case 'g':
- {
- - f64 Value = ReadVarArgFloat(FloatLength, &ArgList);
- + f64 Value = ReadVarArgFloat(FloatLength, ArgList);
- } break;
- case 'G':
- {
- - f64 Value = ReadVarArgFloat(FloatLength, &ArgList);
- + f64 Value = ReadVarArgFloat(FloatLength, ArgList);
- } break;
- case 'a':
- {
- - f64 Value = ReadVarArgFloat(FloatLength, &ArgList);
- + f64 Value = ReadVarArgFloat(FloatLength, ArgList);
- } break;
- case 'A':
- {
- - f64 Value = ReadVarArgFloat(FloatLength, &ArgList);
- + f64 Value = ReadVarArgFloat(FloatLength, ArgList);
- } break;
- case 'c':
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement