Add a MSVC / Windows compatible snprintf function (#7353)
Use sizeof where applicable for mt_snprintf
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user