[ros-diffs] [cwittich] 32084: move code to the correct position to handle all cases in 'if'

cwittich at svn.reactos.org cwittich at svn.reactos.org
Sat Feb 2 11:52:29 CET 2008


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=32084&r1=32083&r2=32084&view=diff
==============================================================================
--- 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;
 		}
 	}
 




More information about the Ros-diffs mailing list