summaryrefslogtreecommitdiff
path: root/www/arena/patches/patch-aj
blob: e19d55da02afe340d77b1b98e6779aa42475660e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$NetBSD: patch-aj,v 1.1 2000/02/09 01:01:22 fredb Exp $

--- Arena/Source/jpeg.c.orig	Thu Feb 19 09:57:26 1998
+++ Arena/Source/jpeg.c	Tue Feb  8 18:33:17 2000
@@ -531,8 +531,8 @@
 	     case 1:
 	       cr = cg = cb = scan_buffer[xpos];
 	       GetColour(cr, cg, cb, &ulp);
-	       *dp++ = ((char*)&ulp)[0];   /* LSB first! */
-	       *dp++ = ((char*)&ulp)[1];
+	       *dp++ = (ulp      ) & 0xFF;	/* LSB first! */
+	       *dp++ = (ulp >>  8) & 0xFF;
 	       break;
 
 	     case 3:
@@ -540,8 +540,8 @@
 	       cg = scan_buffer[1+(xpos * 3)];
 	       cb = scan_buffer[2+(xpos * 3)];
 	       GetColour(cr, cg, cb, &ulp);
-	       *dp++ = ((char*)&ulp)[0];   /* LSB first! */
-	       *dp++ = ((char*)&ulp)[1];
+	       *dp++ = (ulp      ) & 0xFF;	/* LSB first! */
+	       *dp++ = (ulp >>  8) & 0xFF;
 	       break;
 
 	     default: