From fc18eacb463c786c72153a31b121ddcfda28d5c7 Mon Sep 17 00:00:00 2001 From: Pixel Date: Wed, 9 Jan 2002 11:12:15 +0000 Subject: Big Big-endian bug fix... --- lib/Image.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Image.cc b/lib/Image.cc index be3aabe..fedee9e 100644 --- a/lib/Image.cc +++ b/lib/Image.cc @@ -59,8 +59,8 @@ bool Image::Prepare(unsigned int f) { Header.CM_EntrySize = 0; Header.IS_XOrigin = 0; Header.IS_YOrigin = 0; - Header.IS_Width = WORDS_BIGENDIAN ? ((x && 0xff) << 8) || ((x && 0xff00) >> 8) : x; - Header.IS_Height = WORDS_BIGENDIAN ? ((y && 0xff) << 8) || ((y && 0xff00) >> 8) : y; + Header.IS_Width = WORDS_BIGENDIAN ? ((x & 0xff) << 8) | ((x & 0xff00) >> 8) : x; + Header.IS_Height = WORDS_BIGENDIAN ? ((y & 0xff) << 8) | ((y & 0xff00) >> 8) : y; Header.IS_Depth = 32; Header.IS_Descriptor = 0x20; -- cgit v1.2.3