From c0022547f2186571ab9273e699e5936529a942ba Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 12 Aug 2023 22:26:21 -0700 Subject: til_fb: fix bug in til_fb_fragment_slice_single() Silly bug, these fragmenters need to be revisited in general to have less copy pasta across the texture fragment and main fragment. Easily triggered with: --seed=0x64daba35 '--module=compose,layers=julia\,checkers\\\,size\\\=:96\\\,pattern\\\=checkered\\\,fill_module\\\=:checkers\\\\\\\,size\\\\\\\=128\\\\\\\,pattern\\\\\\\=checkered\\\\\\\,fill_module\\\\\\\=moire\\\\\\\\\\\\\\\,type\\\\\\\\\\\\\\\=pinwheel\\\\\\\\\\\\\\\,scale\\\\\\\\\\\\\\\=1\\\\\\\\\\\\\\\,pinch\\\\\\\\\\\\\\\=0\\\\\\\\\\\\\\\,points\\\\\\\\\\\\\\\=5\\\\\\\\\\\\\\\,spin\\\\\\\\\\\\\\\=.1\\\\\\\,dynamics\\\\\\\=alternating\\\\\\\,dynamics_rate\\\\\\\=1.0\\\\\\\,fill\\\\\\\=textured\\\\\\\,fill_color\\\\\\\=0xffffff\\\\\\\,clear\\\\\\\=textured\\\\\\\,clear_color\\\\\\\=0x000000\\\,dynamics\\\=alternating\\\,dynamics_rate\\\=1.0\\\,fill\\\=textured\\\,fill_color\\\=0xffffff\\\,clear\\\=textured\\\,clear_color\\\=0x000000,texture=plasma' '--video=sdl,fullscreen=off,size=640x480' --- src/til_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/til_fb.c b/src/til_fb.c index aa20fd9..5de7035 100644 --- a/src/til_fb.c +++ b/src/til_fb.c @@ -595,7 +595,7 @@ int til_fb_fragment_slice_single(const til_fb_fragment_t *fragment, unsigned n_f *(res_fragment->texture) = (til_fb_fragment_t){ .buf = fragment->texture->buf + yoff * fragment->texture->pitch, .x = fragment->x, - .y = yoff, + .y = fragment->y + yoff, .width = fragment->width, .height = MIN(fragment->height - yoff, slice), .frame_width = fragment->frame_width, -- cgit v1.2.3