diff --git a/src/am_map.c b/src/am_map.c
index c06bd25612daff559dd49bdb79787ae161f8d38f..4ad40b7aa6dae765c564ff7caac338f216e9f32d 100644
--- a/src/am_map.c
+++ b/src/am_map.c
@@ -721,7 +721,7 @@ static void AM_drawPixel(INT32 xx, INT32 yy, INT32 cc)
 	UINT8 *dest = screens[0];
 	if (xx < 0 || yy < 0 || xx >= vid.width || yy >= vid.height)
 		return; // off the screen
-	dest[(yy*vid.rowbytes) + (xx * vid.bpp)] = (cc & 0xFF);
+	dest[(yy*vid.width) + xx] = cc;
 }
 
 //