Fixed crash in get_id_from_behavior_name()

This commit is contained in:
MysterD 2023-11-08 13:20:10 -08:00
parent 98b16c978f
commit 9e0aa2b730
1 changed files with 1 additions and 1 deletions

View File

@ -589,7 +589,7 @@ const char* get_behavior_name_from_id(enum BehaviorId id) {
enum BehaviorId get_id_from_behavior_name(const char* name) {
for (enum BehaviorId i = 0; i < id_bhv_max_count; i++) {
if (!strcmp(name, gBehaviorTable[i].name)) {
if (gBehaviorTable[i].name && !strcmp(name, gBehaviorTable[i].name)) {
return i;
}
}