use memset to allow VS compiler

pull/1863/head
aoowweenn 2018-03-31 14:44:18 +08:00
parent 1ea7230785
commit 21b518e350
1 changed files with 2 additions and 1 deletions

View File

@ -95,7 +95,8 @@ namespace pmx
// UTF16 to UTF8 // UTF16 to UTF8
const uint16_t* sourceStart = (uint16_t*)buffer.data(); const uint16_t* sourceStart = (uint16_t*)buffer.data();
const unsigned int targetSize = size * 3; // enough to encode const unsigned int targetSize = size * 3; // enough to encode
char targetStart[targetSize] = { 0 }; char targetStart[targetSize];
std::memset(targetStart, 0, targetSize * sizeof(char));
utf8::utf16to8( sourceStart, sourceStart + size/2, targetStart ); utf8::utf16to8( sourceStart, sourceStart + size/2, targetStart );