Package: libspectre Severity: normal Hi there.
This problem seems to occour with bigendian arches. I fixed the bug and Carlos Garcia Campos (upstream) committed a patch at http://cgit.freedesktop.org/libspectre/commit/?id=35aa9dfac2631de24a40d95d1469acb52f379249 The explanation for this bug is at: https://bugs.launchpad.net/ubuntu/+source/libspectre/+bug/298139/comments/5 My original patch is at: http://launchpadlibrarian.net/41103048/fix-for-libspectre.patch Thanks, Rogério Brito. -- System Information: Debian Release: squeeze/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.34-rc1-00997-ga3d3203 (SMP w/2 CPU cores; PREEMPT) Locale: LANG=en_US.utf-8, LC_CTYPE=pt_BR.utf-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash -- Rogério Brito : rbr...@{ime.usp.br,gmail.com} : GPG key 1024D/7C2CAEB8 http://rb.doesntexist.org : Packages for LaTeX : algorithms.berlios.de DebianQA: http://qa.debian.org/developer.php?login=rbrito%40ime.usp.br
>From 35aa9dfac2631de24a40d95d1469acb52f379249 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos <carlo...@gnome.org> Date: Sun, 28 Mar 2010 11:18:38 +0000 Subject: Use the correct format string for DisplayHandle arg depending on the platform --- diff --git a/libspectre/spectre-device.c b/libspectre/spectre-device.c index d181fe7..a4deac2 100644 --- a/libspectre/spectre-device.c +++ b/libspectre/spectre-device.c @@ -179,6 +179,7 @@ spectre_device_render (SpectreDevice *device, int n_args = 12; int arg = 0; int success; + char *fmt; char *text_alpha, *graph_alpha; char *size = NULL; char *resolution, *set; @@ -239,8 +240,10 @@ spectre_device_render (SpectreDevice *device, DISPLAY_LITTLEENDIAN | #endif DISPLAY_TOPFIRST); - args[arg++] = dsp_handle = _spectre_strdup_printf ("-sDisplayHandle=16#%llx", - (uintptr_t)device); + fmt = _spectre_strdup_printf ("-sDisplayHandle=16#%s", + sizeof (device) == 4 ? "%lx" : "%llx"); + args[arg++] = dsp_handle = _spectre_strdup_printf (fmt, device); + free (fmt); if (rc->use_platform_fonts == FALSE) args[arg++] = "-dNOPLATFONTS"; -- cgit v0.8.3-6-g21f6