diff --git a/Jupiter/CString_Imp.h b/Jupiter/CString_Imp.h index f3d51a1..1509558 100644 --- a/Jupiter/CString_Imp.h +++ b/Jupiter/CString_Imp.h @@ -146,7 +146,7 @@ template<> size_t inline Jupiter::CString_Type::vformat(const char *format if (minLen < 0) return 0; // We simply can not work with this. this->setBufferSizeNoCopy(minLen); Jupiter::String_Type::length = minLen; - vsnprintf(Jupiter::String_Type::str, Jupiter::String_Type::length, format, args); + vsnprintf(Jupiter::String_Type::str, Jupiter::String_Type::length + 1, format, args); Jupiter::String_Type::str[Jupiter::String_Type::length] = 0; return Jupiter::String_Type::length; } @@ -183,7 +183,7 @@ template<> size_t inline Jupiter::CString_Type::avformat(const char *forma if (minLen < 0) return 0; // We simply can not work with this. this->setBufferSize(Jupiter::String_Type::length + minLen); - minLen = vsnprintf(Jupiter::String_Type::str + Jupiter::String_Type::length, minLen, format, args); + minLen = vsnprintf(Jupiter::String_Type::str + Jupiter::String_Type::length, minLen + 1, format, args); if (minLen <= 0) return 0; Jupiter::String_Type::length += minLen; Jupiter::String_Type::str[Jupiter::String_Type::length] = 0; diff --git a/Release/Jupiter.lib b/Release/Jupiter.lib index fe0ce60..452025b 100644 Binary files a/Release/Jupiter.lib and b/Release/Jupiter.lib differ