mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-11-19 12:40:10 -08:00
fix ub reported by gcc builds
This commit is contained in:
1 parent
f6b4a38134
commit
2db9ec1312
5 files changed
+7
-10
No files matched your search
@@ -516,12 +516,12 @@ fnt_hash2style_from_tag_size_flags(FNT_Tag tag, F32 size, FNT_RasterFlags flags)
|
||||
//- rjf: tag * size -> style hash
|
||||
U64 style_hash = {0};
|
||||
{
|
||||
F64 size_f64 = size;
|
||||
union { F64 size_f64; U64 size_u64; } size_pun = {.size_f64 = (F64)size};
|
||||
U64 buffer[] =
|
||||
{
|
||||
tag.u64[0],
|
||||
tag.u64[1],
|
||||
*(U64 *)(&size_f64),
|
||||
size_pun.size_u64,
|
||||
(U64)flags,
|
||||
};
|
||||
style_hash = fnt_little_hash_from_string(5381, str8((U8 *)buffer, sizeof(buffer)));
|
||||
|
||||
Reference in new issue
Block a user