From f21ce5768b2c699a46ca289626d81a5c5d11deb7 Mon Sep 17 00:00:00 2001 From: Tamas TEVESZ Date: Sat, 27 Dec 2008 17:45:38 +0100 Subject: [PATCH] avoid integer overflow Actually, the whole thing is so chock full of signed vs unsigned mixups and the assumption of all the world is 32-bit that i'm not sure anymore that correcting them one by one is a good idea. what would probably work best is that if someone deeply familiar with the code (*looks in dan's general direction*) cleaned the data types up, then legions of grunts like myself could start cleaning the rest with relative confidence... --- src/wmspec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wmspec.c b/src/wmspec.c index 27ce2523..7e395dfa 100644 --- a/src/wmspec.c +++ b/src/wmspec.c @@ -393,8 +393,8 @@ wNETWMGetCurrentDesktopFromHint(WScreen *scr) static unsigned long* findBestIcon(unsigned long *data, unsigned long items) { - int size, wanted, d, distance; - unsigned long i; + int size, wanted, d; + unsigned long i, distance; unsigned long *icon; /* better use only 75% of icon_size. For 64x64 this means 48x48