Package: xloadimage
Version: 4.1-16
Severity: normal
Tags: patch

Hi,
-fullscreen option behaves incorrectly, if one of the images' dimensions
is bigger than screen, but the other is not. It's caused by a forgotten
typecast from uint to int. I'm attaching a patch that fixes it.

Anton Khirnov



-- System Information:
Debian Release: sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.27-nb.a (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages xloadimage depends on:
ii  libc6                  2.8+20080809-1    GNU C Library: Shared libraries
ii  libjpeg62              6b-14             The Independent JPEG Group's JPEG
ii  libpng12-0             1.2.27-2          PNG library - runtime
ii  libtiff4               3.8.2-11          Tag Image File Format (TIFF) libra
ii  libx11-6               2:1.1.5-2         X11 client-side library
ii  zlib1g                 1:1.2.3.3.dfsg-12 compression library - runtime

xloadimage recommends no packages.

xloadimage suggests no packages.

-- no debconf information
--- xloadimage.c	2008-11-20 20:17:46.000000000 +0100
+++ xloadimage.c	2008-11-20 20:23:28.000000000 +0100
@@ -370,8 +370,8 @@
       if ((newimage->width > DisplayWidth(disp, scrn)) ||
 	  (newimage->height > DisplayHeight(disp, scrn))) {
 	opt->info.zoom.x= opt->info.zoom.y= 
-	  (newimage->width - DisplayWidth(disp, scrn) >
-	   newimage->height - DisplayHeight(disp, scrn) ?
+	  ((int)newimage->width - DisplayWidth(disp, scrn) >
+	   (int)newimage->height - DisplayHeight(disp, scrn) ?
 	   (float)DisplayWidth(disp, scrn) / (float)newimage->width * 100.0 :
 	   (float)DisplayHeight(disp, scrn) / (float)newimage->height * 100.0);
       }

Reply via email to