From beafd13b1a8ebf275fff57775bb9af97875d9862 Mon Sep 17 00:00:00 2001 From: terminx Date: Sun, 18 Nov 2018 18:07:44 +0000 Subject: [PATCH] Derp git-svn-id: https://svn.eduke32.com/eduke32@7170 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/osd.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/source/build/src/osd.cpp b/source/build/src/osd.cpp index 09a28c230..201d14355 100644 --- a/source/build/src/osd.cpp +++ b/source/build/src/osd.cpp @@ -1729,14 +1729,16 @@ void OSD_Puts(const char *tmpstr) // void OSD_DispatchQueued(void) { - if (!osd->history.exec) return; + if (!osd->history.exec) + return; - for (int cmd=osd->history.exec-1; cmd>=0; cmd--) - OSD_Dispatch((const char *)osd->history.buf[cmd]); + int cmd = osd->history.exec - 1; osd->history.exec = 0; -} + for (; cmd >= 0; cmd--) + OSD_Dispatch((const char *)osd->history.buf[cmd]); +} // // OSD_Dispatch() -- Executes a command string