[ros-diffs] [hpoussin] 23505: Fix an infinite loop if environment variable is not defined
hpoussin at svn.reactos.org
hpoussin at svn.reactos.org
Sun Aug 6 20:44:27 CEST 2006
Author: hpoussin
Date: Sun Aug 6 22:44:27 2006
New Revision: 23505
URL: http://svn.reactos.org/svn/reactos?rev=23505&view=rev
Log:
Fix an infinite loop if environment variable is not defined
Modified:
trunk/reactos/dll/win32/shell32/shellpath.c
Modified: trunk/reactos/dll/win32/shell32/shellpath.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shellpath.c?rev=23505&r1=23504&r2=23505&view=diff
==============================================================================
--- trunk/reactos/dll/win32/shell32/shellpath.c (original)
+++ trunk/reactos/dll/win32/shell32/shellpath.c Sun Aug 6 22:44:27 2006
@@ -1548,12 +1548,12 @@
hr = HRESULT_FROM_WIN32(GetLastError());
else
hr = S_OK;
- if (SUCCEEDED(hr) && szDest[0] == '%')
+ /* By default, terminate loop */
+ szTemp[0] = '\0';
+ if (SUCCEEDED(hr) && strcmpW(szSrc, szDest) != 0)
+ {
+ /* Continue the loop */
strcpyW(szTemp, szDest);
- else
- {
- /* terminate loop */
- szTemp[0] = '\0';
}
}
end:
More information about the Ros-diffs
mailing list