diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/palette.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/palette.c b/src/palette.c index d600001..1a24127 100644 --- a/src/palette.c +++ b/src/palette.c @@ -30,7 +30,7 @@ bool nsfb_palette_new(struct nsfb_palette_s **palette, int width) (*palette)->last = 0; (*palette)->dither = false; - (*palette)->dither_ctx.data_len = width * 3; + (*palette)->dither_ctx.data_len = width * 3 * sizeof(int); (*palette)->dither_ctx.data = malloc(width * 3 * sizeof(int)); if ((*palette)->dither_ctx.data == NULL) { nsfb_palette_free(*palette); |