Skip to content

Commit

Permalink
corec: use 64-bit integer to string if SIZE_MAX > INT32_MAX
Browse files Browse the repository at this point in the history
We should not hardcode the values.
  • Loading branch information
robUx4 committed Dec 27, 2024
1 parent 596ac24 commit 5b1d1ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion corec/corec/helpers/parser/parser2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1617,7 +1617,7 @@ NOINLINE bool_t DataToString(tchar_t* Value, size_t ValueLen, const void* Data,
break;

case TYPE_SIZE:
#if defined(SIZE_MAX) && SIZE_MAX > 0xFFFFFFFF
#if SIZE_MAX > INT32_MAX
Int64ToString(Value,ValueLen,*(size_t*)Data,0);
#else
IntToString(Value,ValueLen,*(size_t*)Data,0);
Expand Down

0 comments on commit 5b1d1ee

Please sign in to comment.