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/gui/guiConfirmRegistration.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/gui/guiConfirmRegistration.cpp')
-rw-r--r-- | src/gui/guiConfirmRegistration.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/guiConfirmRegistration.cpp b/src/gui/guiConfirmRegistration.cpp index fea9f5cda..7f5aec264 100644 --- a/src/gui/guiConfirmRegistration.cpp +++ b/src/gui/guiConfirmRegistration.cpp @@ -25,6 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include <IGUIStaticText.h> #include <IGUIFont.h> #include "intlGUIEditBox.h" +#include "porting.h" #include "gettext.h" @@ -96,8 +97,9 @@ void GUIConfirmRegistration::regenerateGui(v2u32 screensize) "Join to confirm account creation or click Cancel to " "abort."); char info_text_buf[1024]; - snprintf(info_text_buf, sizeof(info_text_buf), info_text_template.c_str(), - address.c_str(), m_playername.c_str()); + porting::mt_snprintf(info_text_buf, sizeof(info_text_buf), + info_text_template.c_str(), address.c_str(), + m_playername.c_str()); wchar_t *info_text_buf_wide = utf8_to_wide_c(info_text_buf); gui::IGUIEditBox *e = new gui::intlGUIEditBox(info_text_buf_wide, true, |