[qwaq] Continue processing on void commands

If the last command in the buffer had no parameters, its length would be
only 2 and thus processing would stop before reading the command from
the buffer.
This commit is contained in:
Bill Currie 2020-03-02 18:19:41 +09:00
parent fa66e9fc2f
commit a0c4d56668

View file

@ -513,7 +513,7 @@ cmd_wbkgd (qwaq_resources_t *res)
static void static void
process_commands (qwaq_resources_t *res) process_commands (qwaq_resources_t *res)
{ {
while (RB_DATA_AVAILABLE (res->command_queue) > 2) { while (RB_DATA_AVAILABLE (res->command_queue) >= 2) {
switch ((qwaq_commands) RB_PEEK_DATA (res->command_queue, 0)) { switch ((qwaq_commands) RB_PEEK_DATA (res->command_queue, 0)) {
case qwaq_cmd_newwin: case qwaq_cmd_newwin:
cmd_newwin (res); cmd_newwin (res);