try to align mask correctly

This commit is contained in:
Chris Young 2012-08-10 18:54:00 +01:00
parent 7c9ac8980f
commit 3ed1339b3f
1 changed files with 2 additions and 1 deletions

View File

@ -488,7 +488,8 @@ PLANEPTR ami_bitmap_get_mask(struct bitmap *bitmap, int width, int height)
if(bitmap->native_mask) return bitmap->native_mask;
bitmap->native_mask = AllocRaster(width, height);
while((width % 8) != 0) width++;
for(int i=0; i<(height * (width / 8)); i++) {
bitmap->native_mask[i] = 0;
}