From fefdaa1ec955ee1e36ed55fce1b2c88ba5cf7811 Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Tue, 9 Mar 2021 08:12:02 +0000 Subject: [PATCH] Fix off-by-one in selhero_GenerateName The last name in each list was never selected --- SourceX/DiabloUI/selhero.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SourceX/DiabloUI/selhero.cpp b/SourceX/DiabloUI/selhero.cpp index f4a5c4c88..b4fccea4b 100644 --- a/SourceX/DiabloUI/selhero.cpp +++ b/SourceX/DiabloUI/selhero.cpp @@ -612,7 +612,7 @@ const char *selhero_GenerateName(uint8_t hero_class) } }; - int iRand = rand() % 9; + int iRand = rand() % 10; return kNames[hero_class][iRand]; }