Fix windows ReadConsoleInput return value check

I messed up the check. I forgot that windows commonly has opposite
return values to posix and failed to check it from documentation.

Fixes 1345
develop
Pauli 2018-07-08 00:50:43 +03:00
parent 5a0d00d5d2
commit dec61b89be
1 changed files with 1 additions and 1 deletions

@ -285,7 +285,7 @@ namespace DFHack
INPUT_RECORD rec; INPUT_RECORD rec;
DWORD count; DWORD count;
lock->unlock(); lock->unlock();
if (ReadConsoleInputA(console_in, &rec, 1, &count) != 0) { if (ReadConsoleInputA(console_in, &rec, 1, &count) == 0) {
lock->lock(); lock->lock();
return Console::SHUTDOWN; return Console::SHUTDOWN;
} }