Skip to content

Commit 2bcdbc4

Browse files
committed
ATRONIX: FIX: Use 32-bit for image pixel
Long could be 64-bit on some systems Based on commit: zsx@ca9abcf
1 parent ecee1af commit 2bcdbc4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core/t-image.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
#include "sys-core.h"
3737

38-
#define CLEAR_IMAGE(p, x, y) memset(p, 0, x * y * sizeof(long))
38+
#define CLEAR_IMAGE(p, x, y) memset(p, 0, x * y * sizeof(u32))
3939

4040

4141
/***********************************************************************
@@ -414,10 +414,10 @@ INLINE REBCNT ARGB_To_BGR(REBCNT i)
414414
else return 0;
415415
}
416416

417-
img = Make_Series(w * h + 1, sizeof(REBINT), FALSE);
417+
img = Make_Series(w * h + 1, sizeof(u32), FALSE);
418418
LABEL_SERIES(img, "make image");
419419
img->tail = w * h;
420-
CLEAR(img->data, (img->tail + 1) * sizeof(REBINT));
420+
CLEAR(img->data, (img->tail + 1) * sizeof(u32));
421421
IMG_WIDE(img) = w;
422422
IMG_HIGH(img) = h;
423423
return img;

0 commit comments

Comments
 (0)