Skip to content
Snippets Groups Projects
Commit 2c637ce1 authored by est31's avatar est31
Browse files

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.
parent 9c44aace
No related branches found
No related tags found
No related merge requests found
......@@ -38,10 +38,12 @@ const char *ClientInterface::statenames[] = {
"Disconnecting",
"Denied",
"Created",
"InitSent",
"AwaitingInit2",
"HelloSent",
"InitDone",
"DefinitionsSent",
"Active"
"Active",
"SudoMode",
};
......
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment