diff options
author | nOOb3167 <nOOb3167@gmail.com> | 2018-07-22 21:56:06 +0200 |
---|---|---|
committer | SmallJoker <SmallJoker@users.noreply.github.com> | 2018-07-22 21:56:06 +0200 |
commit | 9537cfd3f8264700619f58d15741829489e1099e (patch) | |
tree | 36412677aba19e1a2037db7fad2f934a2daa5046 /src/guiscalingfilter.cpp | |
parent | 9855651c06f84f29780cf6b25a392ac841b4630c (diff) | |
download | minetest-9537cfd3f8264700619f58d15741829489e1099e.tar.gz minetest-9537cfd3f8264700619f58d15741829489e1099e.tar.bz2 minetest-9537cfd3f8264700619f58d15741829489e1099e.zip |
Add a MSVC / Windows compatible snprintf function (#7353)
Use sizeof where applicable for mt_snprintf
Diffstat (limited to 'src/guiscalingfilter.cpp')
-rw-r--r-- | src/guiscalingfilter.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/guiscalingfilter.cpp b/src/guiscalingfilter.cpp index dc6219b60..3b4377da5 100644 --- a/src/guiscalingfilter.cpp +++ b/src/guiscalingfilter.cpp @@ -18,6 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "guiscalingfilter.h" #include "imagefilters.h" +#include "porting.h" #include "settings.h" #include "util/numeric.h" #include <cstdio> @@ -78,7 +79,7 @@ video::ITexture *guiScalingResizeCached(video::IVideoDriver *driver, // Calculate scaled texture name. char rectstr[200]; - snprintf(rectstr, sizeof(rectstr), "%d:%d:%d:%d:%d:%d", + porting::mt_snprintf(rectstr, sizeof(rectstr), "%d:%d:%d:%d:%d:%d", srcrect.UpperLeftCorner.X, srcrect.UpperLeftCorner.Y, srcrect.getWidth(), |