From 21b518e350383f3954111b11910f5af726b9c6a5 Mon Sep 17 00:00:00 2001 From: aoowweenn Date: Sat, 31 Mar 2018 14:44:18 +0800 Subject: [PATCH] use memset to allow VS compiler --- code/MMDPmxParser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/MMDPmxParser.cpp b/code/MMDPmxParser.cpp index fa0d4b823..2a6a20b48 100644 --- a/code/MMDPmxParser.cpp +++ b/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 );