Rance Quest: GetPartsCGName() returns the name specified by SetPartsCG()

This fixes a graphical bug mentioned in
https://github.com/nunuhara/xsystem4/issues/180#issuecomment-2351079908 .
This commit is contained in:
kichikuou
2024-09-15 07:57:40 +09:00
parent 0f121860fe
commit 34258511b9
+4 -1
View File
@@ -1084,7 +1084,10 @@ bool PE_SetPartsCG_by_string_index(int parts_no, struct string *cg_no,
}
struct parts_cg *cg = parts_get_cg(parts, state);
return parts_cg_set_by_index(parts, cg, atoi(cg_no->text));
if (!parts_cg_set_by_index(parts, cg, atoi(cg_no->text)))
return false;
cg->name = string_ref(cg_no);
return true;
}
void PE_GetPartsCGName(int parts_no, struct string **cg_name, int state)