1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 12:28:22 +01:00

Fix findBestIcon()

This patch fixes the issue described here:

https://bugzilla.novell.com/show_bug.cgi?id=371974
This commit is contained in:
Vladimir Nadvornik
2009-08-21 01:49:24 +02:00
committed by Carlos R. Mafra
parent 95a576bd62
commit e113ec10c9

View File

@@ -390,7 +390,7 @@ static unsigned long *findBestIcon(unsigned long *data, unsigned long items)
* results in better overall aesthetics -Dan */
wanted = wPreferences.icon_size * wPreferences.icon_size;
for (icon = NULL, distance = LONG_MAX, i = 0L; i < items - 1;) {
for (icon = NULL, distance = wanted, i = 0L; i < items - 1;) {
size = data[i] * data[i + 1];
if (size == 0)
break;