From 0f471d9b7a7c6b3891228f94aa7a5ba002278e5d Mon Sep 17 00:00:00 2001 From: Jordan Cristiano Date: Tue, 28 Jul 2015 21:07:55 -0400 Subject: [PATCH] Fixed incorrect invalid index check --- demboyz/demofile/demotypes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demboyz/demofile/demotypes.h b/demboyz/demofile/demotypes.h index c2374e8..d9cbd12 100644 --- a/demboyz/demofile/demotypes.h +++ b/demboyz/demofile/demotypes.h @@ -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 ""; }