diff --git a/pipi/codec/oric.c b/pipi/codec/oric.c index ba790c3..e6df6c4 100644 --- a/pipi/codec/oric.c +++ b/pipi/codec/oric.c @@ -529,11 +529,11 @@ static void write_screen(float const *data, uint8_t *screen) stride = (WIDTH + 1) * 3; - src = malloc((WIDTH + 1) * (HEIGHT + 1) * 3); - memset(src, 0, (WIDTH + 1) * (HEIGHT + 1) * 3); + src = malloc((WIDTH + 1) * (HEIGHT + 1) * 3 * sizeof(int)); + memset(src, 0, (WIDTH + 1) * (HEIGHT + 1) * 3 * sizeof(int)); - dst = malloc((WIDTH + 1) * (HEIGHT + 1) * 3); - memset(dst, 0, (WIDTH + 1) * (HEIGHT + 1) * 3); + dst = malloc((WIDTH + 1) * (HEIGHT + 1) * 3 * sizeof(int)); + memset(dst, 0, (WIDTH + 1) * (HEIGHT + 1) * 3 * sizeof(int)); /* Import pixels into our custom format */ for(y = 0; y < HEIGHT; y++)