mirror of
https://github.com/brl/mutter.git
synced 2025-01-11 12:12:25 +00:00
test-cogl-pixel-array: fix how data is initialized
There was a missing '* 4' and '* i' in the for() loops that initialized the first test buffer, so it was containing uninitialized data causing the test to fail.
This commit is contained in:
parent
fb79b0c14e
commit
0273b13d75
@ -82,11 +82,11 @@ create_map_tile (TestTile *tile)
|
||||
g_assert (map);
|
||||
|
||||
line = g_alloca (TILE_SIZE * 4);
|
||||
for (i = 0; i < TILE_SIZE; i += 4)
|
||||
for (i = 0; i < TILE_SIZE * 4; i += 4)
|
||||
memcpy (line + i, &tile->color, 4);
|
||||
|
||||
for (i = 0; i < TILE_SIZE; i++)
|
||||
memcpy (map + stride, line, 4);
|
||||
memcpy (map + stride * i, line, TILE_SIZE * 4);
|
||||
|
||||
cogl_buffer_unmap (buffer);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user