$NetBSD: patch-aa,v 1.12 2008/11/23 18:41:16 tron Exp $ --- src/modules/loaders/loader_xpm.c.orig 2008-10-21 03:32:51.000000000 +0100 +++ src/modules/loaders/loader_xpm.c 2008-11-23 18:36:37.000000000 +0000 @@ -253,8 +253,8 @@ return 0; } ptr = im->data; - end = ptr + (sizeof(DATA32) * w * h); pixels = w * h; + end = ptr + pixels; } else {