Author: cwittich
Date: Sat Feb 2 13:52:29 2008
New Revision: 32084
URL:
http://svn.reactos.org/svn/reactos?rev=32084&view=rev
Log:
move code to the correct position to handle all cases in 'if'
Modified:
trunk/reactos/base/shell/cmd/if.c
Modified: trunk/reactos/base/shell/cmd/if.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/if.c?rev=32…
==============================================================================
--- trunk/reactos/base/shell/cmd/if.c (original)
+++ trunk/reactos/base/shell/cmd/if.c Sat Feb 2 13:52:29 2008
@@ -181,26 +181,26 @@
x_flag ^= X_EXEC;
pp += p1len;
- while (_istspace (*pp)) /* skip spaces */
- pp++;
-
- if (*pp == _T('('))
- {
- if (bc)
- {
- pp++;
- bc->bCmdBlock++;
- if ((bc->bCmdBlock >= 0) && (bc->bCmdBlock < MAX_PATH))
- bc->bExecuteBlock[bc->bCmdBlock] = x_flag & X_EXEC;
- /* commands are in the next lines */
- if (*pp == _T('\0'))
- return 0;
- }
- }
-
if ( x_flag )
{
x_flag |= X_EMPTY;
+ }
+ }
+
+ while (_istspace (*pp)) /* skip spaces */
+ pp++;
+
+ if (*pp == _T('('))
+ {
+ if (bc)
+ {
+ pp++;
+ bc->bCmdBlock++;
+ if ((bc->bCmdBlock >= 0) && (bc->bCmdBlock < MAX_PATH))
+ bc->bExecuteBlock[bc->bCmdBlock] = x_flag & X_EXEC;
+ /* commands are in the next lines */
+ if (*pp == _T('\0'))
+ return 0;
}
}