mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-31 18:31:04 +00:00
Fix Irrlicht snprintf problems and UB in my_string_to_double
This commit is contained in:
parent
baaab310fe
commit
079169612d
4 changed files with 6 additions and 12 deletions
|
@ -43,14 +43,8 @@ typedef float f32;
|
|||
/** This is a typedef for double, it ensures portability of the engine. */
|
||||
typedef double f64;
|
||||
|
||||
//! Defines for snprintf_irr because snprintf method does not match the ISO C
|
||||
//! standard on Windows platforms.
|
||||
//! We want int snprintf_irr(char *str, size_t size, const char *format, ...);
|
||||
#if defined(_MSC_VER)
|
||||
#define snprintf_irr sprintf_s
|
||||
#else
|
||||
//! Note: cannot assume that positional arguments are supported (not on Windows)
|
||||
#define snprintf_irr snprintf
|
||||
#endif // _MSC_VER
|
||||
|
||||
//! Type name for character type used by the file system (legacy).
|
||||
typedef char fschar_t;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue