commit ad17a9e64ae0f03fa77f8fe5a39d005faec0a7ad from: matthias date: Sat Aug 12 15:08:40 2006 UTC We also have to swap the byteorder, if dermob runs on a big-endian machine and the binary is little-endian. commit - a2a93b840dde3c1b4bfea464f6d6488f113f4456 commit + ad17a9e64ae0f03fa77f8fe5a39d005faec0a7ad blob - 79999577cb4c4bc900dc59f0a50ae83110e9740a blob + 3086d8454ca551ae34c7b751262fa568e7e89063 --- util.c +++ util.c @@ -24,7 +24,7 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -/* $Id: util.c,v 1.15 2006/08/12 14:15:25 matthias Exp $ */ +/* $Id: util.c,v 1.16 2006/08/12 15:08:40 matthias Exp $ */ #include "dermob.h" #include "mach.h" @@ -306,8 +306,13 @@ get_bo_information() unsigned int swapi(unsigned int i) { - if (bo_a == LE && bo_b == BE) - return swap_bo(i); - - return(i); + unsigned int ret = i; + + if (bo_a == LE && bo_b == BE) { + ret = swap_bo(i); + } else if(bo_a == BE && bo_b == LE) { + ret = swap_bo(i); + } + + return(ret); }