mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-26 15:01:31 +00:00
Prevent underflow of union padding
This commit is contained in:
@@ -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