Dmitry Timoshkov : scrrun: Move the counter check into the code block where counter is actually incremented.

Alexandre Julliard julliard at winehq.org
Tue Feb 11 13:32:40 CST 2014


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

Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date:   Mon Feb 10 15:48:27 2014 +0900

scrrun: Move the counter check into the code block where counter is actually incremented.

---

 dlls/scrrun/filesystem.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/dlls/scrrun/filesystem.c b/dlls/scrrun/filesystem.c
index 59add71..c41709c 100644
--- a/dlls/scrrun/filesystem.c
+++ b/dlls/scrrun/filesystem.c
@@ -540,10 +540,9 @@ static HRESULT WINAPI foldercoll_enumvariant_Next(IEnumVARIANT *iface, ULONG cel
             V_VT(&var[count]) = VT_DISPATCH;
             V_DISPATCH(&var[count]) = (IDispatch*)folder;
             count++;
-        }
-
-        if (count >= celt) break;
 
+            if (count >= celt) break;
+        }
     } while (FindNextFileW(handle, &data));
 
     if (fetched)




More information about the wine-cvs mailing list