Procházet zdrojové kódy

* Fixed an out of bounds bug in cucul_blit().

tags/v0.99.beta14
Sam Hocevar sam před 20 roky
rodič
revize
a1deddf2a6
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. +2
    -1
      cucul/canvas.c

+ 2
- 1
cucul/canvas.c Zobrazit soubor

@@ -230,7 +230,8 @@ int cucul_blit(cucul_canvas_t *dst, int x, int y,
endi = (x + src->width >= dst->width) ? dst->width - x : src->width;
endj = (y + src->height >= dst->height) ? dst->height - y : src->height;

if(starti >= endi || startj >= endj)
if((unsigned int)starti > src->width || (unsigned int)startj > src->height
|| starti >= endi || startj >= endj)
return 0;

for(j = startj; j < endj; j++)


Načítá se…
Zrušit
Uložit