Fixed crash in get_id_from_behavior_name()
This commit is contained in:
parent
98b16c978f
commit
9e0aa2b730
|
@ -589,7 +589,7 @@ const char* get_behavior_name_from_id(enum BehaviorId id) {
|
||||||
|
|
||||||
enum BehaviorId get_id_from_behavior_name(const char* name) {
|
enum BehaviorId get_id_from_behavior_name(const char* name) {
|
||||||
for (enum BehaviorId i = 0; i < id_bhv_max_count; i++) {
|
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;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue