From f18ad796764d89a1c9586e11f63c1221380c8e8f Mon Sep 17 00:00:00 2001 From: Adam Greenwood-Byrne Date: Fri, 19 Mar 2021 11:51:21 +0000 Subject: [PATCH] Fixed resize_vertical_line_xray() --- part12-wgt/wresize.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/part12-wgt/wresize.c b/part12-wgt/wresize.c index e583b6c..b16cd8b 100644 --- a/part12-wgt/wresize.c +++ b/part12-wgt/wresize.c @@ -243,8 +243,9 @@ void resize_vertical_line_xray (block src, block dest, unsigned int whole, unsig px = *src; src += whole; xfrac += step; - if (xfrac > 4294967295) { - xfrac %= 4294967296; + if (xfrac > 65535) { + xfrac %= 65536; + } else { goto novres; } src += resize_width_asm2;