Fix memory corruption with no input devices

This commit is contained in:
Cameron Gutman
2015-05-28 14:18:14 -05:00
parent 63120acf7d
commit 5263607ec8

View File

@@ -200,7 +200,7 @@ void input_init(char* mapfile) {
sig_fdindex = numFds++;
if (fds == NULL)
fds = malloc(sizeof(struct pollfd));
fds = malloc(sizeof(struct pollfd)*numFds);
else
fds = realloc(fds, sizeof(struct pollfd)*numFds);