浏览代码

use memset to allow VS compiler

aoowweenn 7 年之前
父节点
当前提交
21b518e350
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      code/MMDPmxParser.cpp

+ 2 - 1
code/MMDPmxParser.cpp

@@ -95,7 +95,8 @@ namespace pmx
 			// UTF16 to UTF8
 			const uint16_t* sourceStart = (uint16_t*)buffer.data();
 			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 );