(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 8c8207dcc8
commit 2ec6136113
1 changed files with 4 additions and 1 deletions

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;
}
};