mirror of
https://github.com/minetest/irrlicht.git
synced 2025-06-30 23:30:27 +02:00
Get rid of all sprintf calls
This commit is contained in:
@ -514,7 +514,7 @@ bool SJoystickWin32Control::activateJoysticks(core::array<SJoystickInfo> & joyst
|
||||
for(joystick = 0; joystick < joystickInfo.size(); ++joystick)
|
||||
{
|
||||
char logString[256];
|
||||
(void)sprintf(logString, "Found joystick %d, %d axes, %d buttons '%s'",
|
||||
snprintf_irr(logString, sizeof(logString), "Found joystick %d, %d axes, %d buttons '%s'",
|
||||
joystick, joystickInfo[joystick].Axes,
|
||||
joystickInfo[joystick].Buttons, joystickInfo[joystick].Name.c_str());
|
||||
os::Printer::log(logString, ELL_INFORMATION);
|
||||
@ -1096,12 +1096,12 @@ void CIrrDeviceWin32::resizeIfNecessary()
|
||||
|
||||
if (r.right < 2 || r.bottom < 2)
|
||||
{
|
||||
sprintf(tmp, "Ignoring resize operation to (%ld %ld)", r.right, r.bottom);
|
||||
snprintf_irr(tmp, sizeof(tmp), "Ignoring resize operation to (%ld %ld)", r.right, r.bottom);
|
||||
os::Printer::log(tmp);
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(tmp, "Resizing window (%ld %ld)", r.right, r.bottom);
|
||||
snprintf_irr(tmp, sizeof(tmp), "Resizing window (%ld %ld)", r.right, r.bottom);
|
||||
os::Printer::log(tmp);
|
||||
|
||||
getVideoDriver()->OnResize(irr::core::dimension2du((u32)r.right, (u32)r.bottom));
|
||||
|
Reference in New Issue
Block a user