(svn r24515) -Fix: GStexts were compied incompletely when containing certain string codes.

This commit is contained in:
frosch 2012-09-09 15:52:49 +00:00
parent 672dfdc90e
commit e883ca1d4e

View File

@ -183,7 +183,10 @@ struct TranslationWriter : LanguageWriter {
void Write(const byte *buffer, size_t length)
{
*this->strings->Append() = strndup((const char*)buffer, length);
char *dest = MallocT<char>(length + 1);
memcpy(dest, buffer, length);
dest[length] = '\0';
*this->strings->Append() = dest;
}
};