Skip to content

Commit ce65380

Browse files
Ekaterina VergizovaRealCLanger
authored andcommitted
8287446: Enhance icon presentations
Reviewed-by: mbalao Backport-of: bb2210681b230de291ef1c968b5b47013d593e27
1 parent 87deb6c commit ce65380

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -1043,7 +1043,7 @@ JNIEXPORT jintArray JNICALL Java_sun_awt_shell_Win32ShellFolder2_getIconBits
10431043
// limit iconSize to MAX_ICON_SIZE, so that the colorBits and maskBits
10441044
// arrays are big enough.
10451045
// (logic: rather show bad icons than overrun the array size)
1046-
iconSize = iconSize > MAX_ICON_SIZE ? MAX_ICON_SIZE : iconSize;
1046+
iconSize = (iconSize <= 0 || iconSize > MAX_ICON_SIZE) ? MAX_ICON_SIZE : iconSize;
10471047

10481048
// Set up BITMAPINFO
10491049
BITMAPINFO bmi;

0 commit comments

Comments
 (0)