mirror of
https://github.com/moparisthebest/minetest
synced 2024-11-15 05:45:13 -05:00
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.
This commit is contained in:
parent
9c44aace4f
commit
2c637ce1c2
@ -38,10 +38,12 @@ const char *ClientInterface::statenames[] = {
|
|||||||
"Disconnecting",
|
"Disconnecting",
|
||||||
"Denied",
|
"Denied",
|
||||||
"Created",
|
"Created",
|
||||||
"InitSent",
|
"AwaitingInit2",
|
||||||
|
"HelloSent",
|
||||||
"InitDone",
|
"InitDone",
|
||||||
"DefinitionsSent",
|
"DefinitionsSent",
|
||||||
"Active"
|
"Active",
|
||||||
|
"SudoMode",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -167,6 +167,9 @@ namespace con {
|
|||||||
|
|
||||||
#define CI_ARRAYSIZE(a) (sizeof(a) / sizeof((a)[0]))
|
#define CI_ARRAYSIZE(a) (sizeof(a) / sizeof((a)[0]))
|
||||||
|
|
||||||
|
// Also make sure to update the ClientInterface::statenames
|
||||||
|
// array when modifying these enums
|
||||||
|
|
||||||
enum ClientState
|
enum ClientState
|
||||||
{
|
{
|
||||||
CS_Invalid,
|
CS_Invalid,
|
||||||
|
Loading…
Reference in New Issue
Block a user