diff options
author | Mattes D <github@xoft.cz> | 2016-02-24 21:29:38 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2016-02-24 21:29:38 +0100 |
commit | 7f76c7f3625d6e26f423c68dc0bbcb859cad2c06 (patch) | |
tree | cb6f0bbcdbd67f62a3073868fe78f7e7c0b167bd /src/LinearUpscale.h | |
parent | Merge pull request #3044 from LogicParrot/chunkRemove (diff) | |
parent | Fixed LinearUpscale's bounds checking. (diff) | |
download | cuberite-7f76c7f3625d6e26f423c68dc0bbcb859cad2c06.tar cuberite-7f76c7f3625d6e26f423c68dc0bbcb859cad2c06.tar.gz cuberite-7f76c7f3625d6e26f423c68dc0bbcb859cad2c06.tar.bz2 cuberite-7f76c7f3625d6e26f423c68dc0bbcb859cad2c06.tar.lz cuberite-7f76c7f3625d6e26f423c68dc0bbcb859cad2c06.tar.xz cuberite-7f76c7f3625d6e26f423c68dc0bbcb859cad2c06.tar.zst cuberite-7f76c7f3625d6e26f423c68dc0bbcb859cad2c06.zip |
Diffstat (limited to '')
-rw-r--r-- | src/LinearUpscale.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/LinearUpscale.h b/src/LinearUpscale.h index adc873912..b75cb4f82 100644 --- a/src/LinearUpscale.h +++ b/src/LinearUpscale.h @@ -92,8 +92,8 @@ template <typename TYPE> void LinearUpscale2DArray( { // For optimization reasons, we're storing the upscaling ratios in a fixed-size arrays of these sizes // Feel free to enlarge them if needed, but keep in mind that they're on the stack - const int MAX_UPSCALE_X = 128; - const int MAX_UPSCALE_Y = 128; + const int MAX_UPSCALE_X = 129; + const int MAX_UPSCALE_Y = 129; ASSERT(a_Src != nullptr); ASSERT(a_Dst != nullptr); @@ -101,8 +101,8 @@ template <typename TYPE> void LinearUpscale2DArray( ASSERT(a_SrcSizeY > 0); ASSERT(a_UpscaleX > 0); ASSERT(a_UpscaleY > 0); - ASSERT(a_UpscaleX <= MAX_UPSCALE_X); - ASSERT(a_UpscaleY <= MAX_UPSCALE_Y); + ASSERT(a_UpscaleX < MAX_UPSCALE_X); + ASSERT(a_UpscaleY < MAX_UPSCALE_Y); // Pre-calculate the upscaling ratios: TYPE RatioX[MAX_UPSCALE_X]; |