mirror of
https://github.com/odin-lang/Odin.git
synced 2026-10-08 13:51:37 -04:00
Prevent underflow of union padding
This commit is contained in:
1 parent
02246ac6fd
commit
92ec71fa75
1 file changed
+2
@@ -886,6 +886,8 @@ gb_internal lbValue lb_const_value(lbModule *m, Type *type, ExactValue value, lb
|
||||
return res;
|
||||
}
|
||||
} else {
|
||||
// NOTE(korvahkh): forces calculation of variant_block_size
|
||||
type_size_of(bt);
|
||||
i64 block_size = bt->Union.variant_block_size;
|
||||
|
||||
lbValue cv = lb_const_value(m, value_type, value, cc);
|
||||
|
||||
Reference in new issue
Block a user