aboutsummaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/guiConfirmRegistration.cpp6
-rw-r--r--src/gui/profilergraph.cpp5
2 files changed, 7 insertions, 4 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,
diff --git a/src/gui/profilergraph.cpp b/src/gui/profilergraph.cpp
index 740dfa35c..b29285e2f 100644
--- a/src/gui/profilergraph.cpp
+++ b/src/gui/profilergraph.cpp
@@ -18,6 +18,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include "porting.h"
#include "profilergraph.h"
#include "util/string.h"
@@ -95,12 +96,12 @@ void ProfilerGraph::draw(s32 x_left, s32 y_bottom, video::IVideoDriver *driver,
s32 texth = 15;
char buf[10];
- snprintf(buf, 10, "%.3g", show_max);
+ porting::mt_snprintf(buf, sizeof(buf), "%.3g", show_max);
font->draw(utf8_to_wide(buf).c_str(),
core::rect<s32>(textx, y - graphh, textx2,
y - graphh + texth),
meta.color);
- snprintf(buf, 10, "%.3g", show_min);
+ porting::mt_snprintf(buf, sizeof(buf), "%.3g", show_min);
font->draw(utf8_to_wide(buf).c_str(),
core::rect<s32>(textx, y - texth, textx2, y), meta.color);
font->draw(utf8_to_wide(id).c_str(),