From 896a29dfaef6f0fb8e90b85205b599923d6e9e53 Mon Sep 17 00:00:00 2001 From: Alexander Zuev Date: Tue, 21 Jun 2022 18:22:09 +0000 Subject: [PATCH] 8287446: Enhance icon presentations Reviewed-by: prr, azvegint --- src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp b/src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp index 44a47f1da19..1de97dbb826 100644 --- a/src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp +++ b/src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp @@ -1060,7 +1060,7 @@ JNIEXPORT jintArray JNICALL Java_sun_awt_shell_Win32ShellFolder2_getIconBits // limit iconSize to MAX_ICON_SIZE, so that the colorBits and maskBits // arrays are big enough. // (logic: rather show bad icons than overrun the array size) - iconSize = iconSize > MAX_ICON_SIZE ? MAX_ICON_SIZE : iconSize; + iconSize = (iconSize <= 0 || iconSize > MAX_ICON_SIZE) ? MAX_ICON_SIZE : iconSize; // Set up BITMAPINFO BITMAPINFO bmi;