[NTVDM]
authorAleksandar Andrejevic <aandrejevic@reactos.org>
Mon, 19 May 2014 22:40:36 +0000 (22:40 +0000)
committerAleksandar Andrejevic <aandrejevic@reactos.org>
Mon, 19 May 2014 22:40:36 +0000 (22:40 +0000)
Properly repeat the GetNextVDMCommand request. Using "continue" there will not work
if the application has been started by a double click, since in that case AcceptCommands
is FALSE.

svn path=/trunk/; revision=63379

reactos/subsystems/ntvdm/ntvdm.c

index d0e1293..9f630e1 100644 (file)
@@ -435,6 +435,7 @@ CommandThreadProc(LPVOID Parameter)
 
         if (First) CommandInfo.VDMState |= VDM_FLAG_FIRST_TASK;
 
+Command:
         if (!GetNextVDMCommand(&CommandInfo))
         {
             if (CommandInfo.EnvLen > EnvSize)
@@ -443,7 +444,8 @@ CommandThreadProc(LPVOID Parameter)
                 EnvSize = CommandInfo.EnvLen;
                 Env = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, Env, EnvSize);
 
-                continue;
+                /* Repeat the request */
+                goto Command;
             }
 
             break;