Fixed incorrect invalid index check
This commit is contained in:
1 parent
42955b7e01
commit
0f471d9b7a
1 file changed
+1
-1
@@ -75,7 +75,7 @@ inline const char* DemoCmdToString(unsigned int cmd)
|
||||
"dem_stop",
|
||||
"dem_stringtables"
|
||||
};
|
||||
if (cmd > (sizeof(cmdNames) / sizeof(const char*)))
|
||||
if (cmd >= (sizeof(cmdNames) / sizeof(const char*)))
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user