Author: hbelusca
Date: Wed Jun 1 21:23:37 2016
New Revision: 71493
URL:
http://svn.reactos.org/svn/reactos?rev=71493&view=rev
Log:
[DESK.CPL]: Check properly if the StringCbCopy has been copied correctly just by moving
the check block to where it belongs.
CID 1322244
Patch by Victor Martinez Calvo
CORE-11212 #resolve
Modified:
trunk/reactos/dll/cpl/desk/background.c
Modified: trunk/reactos/dll/cpl/desk/background.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/background.c?…
==============================================================================
--- trunk/reactos/dll/cpl/desk/background.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/desk/background.c [iso-8859-1] Wed Jun 1 21:23:37 2016
@@ -19,7 +19,7 @@
#define PLACEMENT_STRETCH 1
#define PLACEMENT_TILE 2
-/* The values in these macros are dependant on the
+/* The values in these macros are dependent on the
* layout of the monitor image and they must be adjusted
* if that image will be changed.
*/
@@ -348,12 +348,11 @@
if ((result == ERROR_SUCCESS) && (_tcslen(originalWallpaper) >
0))
{
hr = StringCbCopy(wallpaperFilename, sizeof(wallpaperFilename),
originalWallpaper);
- }
-
- if (FAILED(hr))
- {
- RegCloseKey(regKey);
- return;
+ if (FAILED(hr))
+ {
+ RegCloseKey(regKey);
+ return;
+ }
}
}