Browse Source

Merge pull request #10 from jeremieroy/master

Fix vsnwprintf under MSVC
Branimir Karadžić 12 years ago
parent
commit
0e16ac913e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      include/bx/string.h

+ 1 - 1
include/bx/string.h

@@ -189,7 +189,7 @@ namespace bx
 	inline int32_t vsnwprintf(wchar_t* _str, size_t _count, const wchar_t* _format, va_list _argList)
 	inline int32_t vsnwprintf(wchar_t* _str, size_t _count, const wchar_t* _format, va_list _argList)
 	{
 	{
 #if BX_COMPILER_MSVC
 #if BX_COMPILER_MSVC
-		int32_t len = ::_vsnwprintf_s(_str, _count*sizeof(wchar_t), _count, _format, _argList);
+		int32_t len = ::_vsnwprintf_s(_str, _count, _count, _format, _argList);
 		return -1 == len ? ::_vscwprintf(_format, _argList) : len;
 		return -1 == len ? ::_vscwprintf(_format, _argList) : len;
 #elif defined(__MINGW32__)
 #elif defined(__MINGW32__)
 		return ::vsnwprintf(_str, _count, _format, _argList);
 		return ::vsnwprintf(_str, _count, _format, _argList);