Rob Shearman : cmd: Fix loop termination check in WCMD_batch.

Alexandre Julliard julliard at winehq.org
Mon Feb 25 06:51:43 CST 2008


Module: wine
Branch: master
Commit: 271eaf5c9d88586662bf7bee1cf358545c9fbaca
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=271eaf5c9d88586662bf7bee1cf358545c9fbaca

Author: Rob Shearman <rob at codeweavers.com>
Date:   Mon Feb 25 09:00:07 2008 +0000

cmd: Fix loop termination check in WCMD_batch.

---

 programs/cmd/batch.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/programs/cmd/batch.c b/programs/cmd/batch.c
index c9f6e76..12c19ed 100644
--- a/programs/cmd/batch.c
+++ b/programs/cmd/batch.c
@@ -58,7 +58,7 @@ void WCMD_batch (WCHAR *file, WCHAR *command, int called, WCHAR *startLabel, HAN
   BATCH_CONTEXT *prev_context;
 
   if (startLabel == NULL) {
-    for(i=0; (i<((sizeof(extension_batch) * sizeof(WCHAR))/WCMD_BATCH_EXT_SIZE)) &&
+    for(i=0; (i<sizeof(extension_batch)/(WCMD_BATCH_EXT_SIZE * sizeof(WCHAR))) &&
              (h == INVALID_HANDLE_VALUE); i++) {
       strcpyW (string, file);
       CharLower (string);




More information about the wine-cvs mailing list