aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-08-31 13:26:40 +0200
committerest31 <MTest31@outlook.com>2015-08-31 13:31:29 +0200
commit2c637ce1c26145269b09c62afb451240a8def401 (patch)
treeb21f88622a153189df0cff4cdb84ce7081569924 /src
parent9c44aace4fce5f4b496201214d3215899f1481c3 (diff)
downloadminetest-2c637ce1c26145269b09c62afb451240a8def401.tar.gz
minetest-2c637ce1c26145269b09c62afb451240a8def401.tar.bz2
minetest-2c637ce1c26145269b09c62afb451240a8def401.zip
Make ClientInterface::statenames consistent with the state enum again
Fixes minetest.get_player_information segfault due to out of bounds access problems, when compiled as debug build.
Diffstat (limited to 'src')
-rw-r--r--src/clientiface.cpp6
-rw-r--r--src/clientiface.h3
2 files changed, 7 insertions, 2 deletions
diff --git a/src/clientiface.cpp b/src/clientiface.cpp
index d4efe60ef..a6ab1ef41 100644
--- a/src/clientiface.cpp
+++ b/src/clientiface.cpp
@@ -38,10 +38,12 @@ const char *ClientInterface::statenames[] = {
"Disconnecting",
"Denied",
"Created",
- "InitSent",
+ "AwaitingInit2",
+ "HelloSent",
"InitDone",
"DefinitionsSent",
- "Active"
+ "Active",
+ "SudoMode",
};
diff --git a/src/clientiface.h b/src/clientiface.h
index 9be8bda61..0d2bca196 100644
--- a/src/clientiface.h
+++ b/src/clientiface.h
@@ -167,6 +167,9 @@ namespace con {
#define CI_ARRAYSIZE(a) (sizeof(a) / sizeof((a)[0]))
+// Also make sure to update the ClientInterface::statenames
+// array when modifying these enums
+
enum ClientState
{
CS_Invalid,