Bruno Jesus : explorer: Ensure launchers_per_row is at least 1 as it is used in divisions.

Alexandre Julliard julliard at winehq.org
Wed Dec 7 15:20:30 CST 2016


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

Author: Bruno Jesus <00cpxxx at gmail.com>
Date:   Tue Dec  6 21:32:27 2016 -0200

explorer: Ensure launchers_per_row is at least 1 as it is used in divisions.

Signed-off-by: Bruno Jesus <00cpxxx at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 programs/explorer/desktop.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c
index d306bb9..7a8252f 100644
--- a/programs/explorer/desktop.c
+++ b/programs/explorer/desktop.c
@@ -555,6 +555,7 @@ static void initialize_launchers( HWND hwnd )
     title_offset_cy = BORDER_SIZE + icon_size + PADDING_SIZE;
     desktop_width = GetSystemMetrics( SM_CXSCREEN );
     launchers_per_row = desktop_width / launcher_size;
+    if (!launchers_per_row) launchers_per_row = 1;
 
     hr = SHGetKnownFolderPath( &FOLDERID_Desktop, KF_FLAG_CREATE, NULL, &desktop_folder );
     if (FAILED( hr ))




More information about the wine-cvs mailing list