main: fix inverted conditional in active console reading code

We were failing when read succeeded, not when it failed, so
we were always reverting to fallback.
This commit is contained in:
Ray Strode 2012-04-04 11:28:26 -04:00
parent f15abb5d95
commit 990f332b3f

View file

@ -1892,7 +1892,7 @@ add_consoles_from_file (state_t *state,
}
ply_trace ("reading file");
if (read (fd, contents, sizeof (contents)))
if (read (fd, contents, sizeof (contents)) <= 0)
{
ply_trace ("couldn't read it: %m");
close (fd);