|
@@ -120,7 +120,7 @@ unsigned short mapindex_name2idx(const char* name, const char *func) {
|
|
}
|
|
}
|
|
|
|
|
|
const char* mapindex_idx2name(unsigned short id, const char *func) {
|
|
const char* mapindex_idx2name(unsigned short id, const char *func) {
|
|
- if (id > MAX_MAPINDEX || !mapindex_exists(id)) {
|
|
|
|
|
|
+ if (id >= MAX_MAPINDEX || !mapindex_exists(id)) {
|
|
ShowDebug("(%s) mapindex_id2name: Requested name for non-existant map index [%d] in cache.\n", func, id);
|
|
ShowDebug("(%s) mapindex_id2name: Requested name for non-existant map index [%d] in cache.\n", func, id);
|
|
return indexes[0].name; // dummy empty string so that the callee doesn't crash
|
|
return indexes[0].name; // dummy empty string so that the callee doesn't crash
|
|
}
|
|
}
|