Fix stupid crash on empty command.

This commit is contained in:
Jan Vidar Krey 2009-07-01 11:31:55 +02:00
parent e53119e92c
commit 98bffd93e9

View File

@ -174,7 +174,7 @@ int handle_net_read(struct user* user)
} }
else else
{ {
if (g_hub->config->max_recv_buffer > (pos - start)) if (((pos - start) > 0) && g_hub->config->max_recv_buffer > (pos - start))
{ {
if (hub_handle_message(g_hub, user, start, (pos - start)) == -1) if (hub_handle_message(g_hub, user, start, (pos - start)) == -1)
{ {