mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
Fix crash caused by not checking for correct SOA kind on polymorphic parameters
This commit is contained in:
+2
-1
@@ -926,7 +926,8 @@ bool is_polymorphic_type_assignable(CheckerContext *c, Type *poly, Type *source,
|
|||||||
|
|
||||||
case Type_Struct:
|
case Type_Struct:
|
||||||
if (source->kind == Type_Struct) {
|
if (source->kind == Type_Struct) {
|
||||||
if (poly->Struct.soa_kind == source->Struct.soa_kind) {
|
if (poly->Struct.soa_kind == source->Struct.soa_kind &&
|
||||||
|
poly->Struct.soa_kind != StructSoa_None) {
|
||||||
bool ok = is_polymorphic_type_assignable(c, poly->Struct.soa_elem, source->Struct.soa_elem, true, modify_type);
|
bool ok = is_polymorphic_type_assignable(c, poly->Struct.soa_elem, source->Struct.soa_elem, true, modify_type);
|
||||||
if (ok) switch (source->Struct.soa_kind) {
|
if (ok) switch (source->Struct.soa_kind) {
|
||||||
case StructSoa_Fixed:
|
case StructSoa_Fixed:
|
||||||
|
|||||||
Reference in New Issue
Block a user