connection::senses(): Enlarge buffer size, pheromones can get very long

This commit is contained in:
Petr Baudis 2011-12-23 19:23:16 +01:00
parent 3889fba5d4
commit cf5586c35f

View file

@ -28,7 +28,7 @@ connection::senses(int tick_id, class agent &a)
}; };
int dir_n = sizeof(dirs) / sizeof(dirs[0]); int dir_n = sizeof(dirs) / sizeof(dirs[0]);
char buf[1024]; char buf[65536];
char *bufp = buf; char *bufp = buf;
bufp += snprintf(bufp, sizeof(buf) - (bufp - buf), "tick %d\r\n", tick_id); bufp += snprintf(bufp, sizeof(buf) - (bufp - buf), "tick %d\r\n", tick_id);
if (a.dead) if (a.dead)