Package: imwheel
Version: 1.0.0pre3
Author: Guillem Jover <guillem@debian.org>
Status: applied
Description:
 Fix unalignment access.

diff -Naur imwheel-1.0.0pre3/imwheel.c imwheel-1.0.0pre3-patched/imwheel.c
--- imwheel-1.0.0pre3/imwheel.c	2002-12-06 16:06:55.000000000 +0100
+++ imwheel-1.0.0pre3-patched/imwheel.c	2004-01-05 17:46:16.000000000 +0100
@@ -232,6 +232,8 @@
 		}
 		else if(*button==0x10) // stick x y are next...
 		{
+			char byte;
+
 			Printf("getInput: stick\n");
 			// must do more for stick...this at least emu's up and down...
 			Printf("getInput: Stick action, reading x and y values from fifo...\n");
@@ -239,13 +241,17 @@
 			// read in separate bytes, to avoid an incomplete read!
 			if(transpose)
 			{
-				read(fifofd,&stick.y,1);
-				read(fifofd,&stick.x,1);
+				read(fifofd,&byte,1);
+				stick.y=byte;
+				read(fifofd,&byte,1);
+				stick.x=byte;
 			}
 			else
 			{
-				read(fifofd,&stick.x,1);
-				read(fifofd,&stick.y,1);
+				read(fifofd,&byte,1);
+				stick.x=byte;
+				read(fifofd,&byte,1);
+				stick.y=byte;
 			}
 			Printf("getInput: Stick=(%d,%d)\n",stick.x,stick.y);
 			if(sensitivity>0)
diff -Naur imwheel-1.0.0pre3/imwheel.h imwheel-1.0.0pre3-patched/imwheel.h
--- imwheel-1.0.0pre3/imwheel.h	2002-12-06 15:55:14.000000000 +0100
+++ imwheel-1.0.0pre3-patched/imwheel.h	2004-01-05 17:43:15.000000000 +0100
@@ -12,7 +12,7 @@
 void freeAllX(XClassHint *xch, XModifierKeymap **xmk, char **wname);
 typedef struct
 {
-	char x,y;
+	int x,y;
 } Stick;
 
 extern const char *optionusage[][2];
