- Fix unterminated string errors in Q_vsnprintf() on windows. Thanks to Eugene C. for reporting (#4907)

- Get rid of bigbuffer in Com_sprintf()
- Get rid of Q_snprintf and replace with Com_sprintf()
This commit is contained in:
Thilo Schulz 2011-02-23 16:17:09 +00:00
parent ab9b08e584
commit ccd24cd647
3 changed files with 46 additions and 27 deletions

View file

@ -132,16 +132,6 @@ typedef int intptr_t;
#include <ctype.h>
#include <limits.h>
// vsnprintf is ISO/IEC 9899:1999
// abstracting this to make it portable
#ifdef _WIN32
#define Q_vsnprintf _vsnprintf
#define Q_snprintf _snprintf
#else
#define Q_vsnprintf vsnprintf
#define Q_snprintf snprintf
#endif
#ifdef _MSC_VER
#include <io.h>
@ -153,8 +143,14 @@ typedef int intptr_t;
typedef unsigned __int32 uint32_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int8 uint8_t;
// vsnprintf is ISO/IEC 9899:1999
// abstracting this to make it portable
int Q_vsnprintf(char *str, size_t size, const char *format, va_list ap);
#else
#include <stdint.h>
#define Q_vsnprintf vsnprintf
#endif
#endif