summaryrefslogtreecommitdiff
path: root/idle.c
diff options
context:
space:
mode:
Diffstat (limited to 'idle.c')
-rw-r--r--idle.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/idle.c b/idle.c
index dd1eeee..c49846d 100644
--- a/idle.c
+++ b/idle.c
@@ -32,6 +32,7 @@ write_byte(char **pos, char byte)
#define MC_GET_STATUS 0x00
#define MC_VARINT_MAX_BYTES 5
#define MC_STATUS_REPLY 0x00
+#define MC_UNDEFINED_VERSION -1
static inline void
write_varint(char **pos, int32_t orig)
@@ -297,7 +298,7 @@ idle_check_get_player_count(struct server *server, struct connection *conn)
pos = buf;
write_byte(&pos, MC_HELO);
- write_varint(&pos, -1); /* Protocol version, -1 = undefined */
+ write_varint(&pos, MC_UNDEFINED_VERSION);
write_str(&pos, hostname);
write_byte(&pos, (port >> 8) & 0xff);
write_byte(&pos, (port >> 0) & 0xff);