[Bug Fix] Fix possible crash with zone name methods. (#2055)

- ZoneLongName and ZoneName were returning nullptr in places that were then attempting to use that nullptr value, causing zone crashes.
This commit is contained in:
Kinglykrab
2022-03-13 15:59:57 -04:00
committed by GitHub
parent 8e62383997
commit b75741ff4e
2 changed files with 7 additions and 6 deletions
+4 -3
View File
@@ -1146,12 +1146,13 @@ const char *lua_get_zone_long_name() {
const char *lua_get_zone_long_name_by_name(const char* zone_name) {
return ZoneLongName(
ZoneID(zone_name)
ZoneID(zone_name),
true
);
}
const char *lua_get_zone_long_name_by_id(uint32 zone_id) {
return ZoneLongName(zone_id);
return ZoneLongName(zone_id, true);
}
const char *lua_get_zone_short_name() {
@@ -1162,7 +1163,7 @@ const char *lua_get_zone_short_name() {
}
const char *lua_get_zone_short_name_by_id(uint32 zone_id) {
return ZoneName(zone_id);
return ZoneName(zone_id, true);
}
int lua_get_zone_instance_id() {