Commit 6a7dae79 authored by Committed by Albert Astals Cid
Splash bilinear scaling: Don't try read behind end
Source line iteration in Splash::scaleImageYuXuBilinear already tries to prevent a read behind source image end, as the comment indicates it and as it's conceptually reasonable. But the check for (currentSrcRow < srcHeight) is wrong and doesn't do what it claims. currentSrcRow will only ever increase to srcHeight - 1 after scaledHeight iterations. Therefore the check always evaluates to true, and src() is aways called. Intention was to prevented the line fetch for the last run and leave line2 identical to line1 (the "extra padding"). Nothing bad happened, because SplashOutputDev::imageSrc and alphaImageSrc gracefully handle the behind-end read. Should be corrected either.
Showing with 1 addition and 1 deletion