aboutsummaryrefslogtreecommitdiff
path: root/src/client/tile.cpp
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2022-07-09 22:32:08 +0200
committerGitHub <noreply@github.com>2022-07-09 22:32:08 +0200
commit051181fa6ee00d8379e8a7dc7442b58342d4352b (patch)
tree58ad84f05310024b311c533684defdbeb5ee3e84 /src/client/tile.cpp
parent7c261118e06c630ea9ad00f20d7005b8edc108dd (diff)
downloadminetest-051181fa6ee00d8379e8a7dc7442b58342d4352b.tar.gz
minetest-051181fa6ee00d8379e8a7dc7442b58342d4352b.tar.bz2
minetest-051181fa6ee00d8379e8a7dc7442b58342d4352b.zip
Enforce limits of settings that could cause buggy behaviour (#12450)
Enforces the setting value bounds that are currently only limited by the GUI (settingtypes.txt).
Diffstat (limited to 'src/client/tile.cpp')
-rw-r--r--src/client/tile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/tile.cpp b/src/client/tile.cpp
index aa78c50f0..87d2818b4 100644
--- a/src/client/tile.cpp
+++ b/src/client/tile.cpp
@@ -1619,7 +1619,7 @@ bool TextureSource::generateImagePart(std::string part_of_name,
* textures that don't have the resources to offer high-res alternatives.
*/
const bool filter = m_setting_trilinear_filter || m_setting_bilinear_filter;
- const s32 scaleto = filter ? g_settings->getS32("texture_min_size") : 1;
+ const s32 scaleto = filter ? g_settings->getU16("texture_min_size") : 1;
if (scaleto > 1) {
const core::dimension2d<u32> dim = baseimg->getDimension();