$NetBSD: patch-ak,v 1.3 2001/04/02 20:16:42 wrstuden Exp $
--- Sources/Core/SurfaceProviders/provider_targa.cpp.orig	Sat Mar 24 10:39:52 2001
+++ Sources/Core/SurfaceProviders/provider_targa.cpp	Sat Mar 24 10:46:53 2001
@@ -151,8 +151,7 @@
 	// read or skip the colormap (rgb-palette)
 	if (colormaptype == 1)
 	{
-		map_length = *((unsigned short *) &file[5]);
-		SWAP_IF_BIG(map_length);
+		map_length = file[5] + 256 * file[6];
 		unsigned char map_size = file[7]>>3;
 
 		if (!read_colormap)
@@ -194,13 +193,11 @@
 	}
 
 	// read pitch, height and bits-pr-pixel
-	pitch = *((unsigned short *) &file[12]);
-	SWAP_IF_BIG(pitch);
+	pitch = file[12] + 256 * file[13];
 	bounding_left = pitch;
 	bounding_right = 0;
 
-	height = *((unsigned short *) &file[14]);
-	SWAP_IF_BIG(height);
+	height = file[14] + 256 * file[15];
 	bounding_top = height;
 	bounding_bottom = 0;
 
@@ -456,8 +453,7 @@
 	}
 	else
 	{
-		entry = *((unsigned short *) &file[pos]);
-		SWAP_IF_BIG(entry);
+		entry = file[pos] + 256 * file[pos + 1];
 		pos += 2;
 	}
 
