fix(selfhost-lower): null-guard Lcx_SubstEnumName — hStore nodes with null typeName segfaulted buxc2 project (bux_strlen(NULL) via String_Len)
This commit is contained in:
@@ -682,6 +682,9 @@ module HirLower {
|
||||
}
|
||||
|
||||
func Lcx_SubstEnumName(ctx: *LowerCtx, name: String) -> String {
|
||||
// HIR nodes may carry null names (e.g. hStore without typeName);
|
||||
// Nim tolerated nil strings, bux_strlen(NULL) segfaults.
|
||||
if name == null as String { return name; }
|
||||
// If name is a bare generic enum name, mangle to concrete name
|
||||
var ge: *Decl = Lcx_FindGenericEnum(ctx, name);
|
||||
if ge != null as *Decl {
|
||||
|
||||
Reference in New Issue
Block a user