From 3eaf58614921cafd5e1413d1bec388ae57d25183 Mon Sep 17 00:00:00 2001 From: Bruno Jesus <00cpxxx@gmail.com> Date: Tue, 6 Dec 2016 21:32:27 -0200 Subject: [PATCH] explorer: Ensure launchers_per_row is at least 1 as it is used in divisions. Signed-off-by: Bruno Jesus <00cpxxx@gmail.com> Signed-off-by: Alexandre Julliard --- programs/explorer/desktop.c | 1 + 1 file changed, 1 insertion(+) diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index d306bb90c90..7a8252fdd70 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 ))