diff --git a/src/localisation/LanguagePack.cpp b/src/localisation/LanguagePack.cpp index 0c8739c34c..588dfc5d8e 100644 --- a/src/localisation/LanguagePack.cpp +++ b/src/localisation/LanguagePack.cpp @@ -28,8 +28,9 @@ LanguagePack *LanguagePack::FromFile(int id, const utf8 *path) FileStream fs = FileStream(path, FILE_MODE_OPEN); fileLength = (uint32)fs.GetLength(); - fileData = Memory::Allocate(fileLength); + fileData = Memory::Allocate(fileLength + 1); fs.Read(fileData, fileLength); + fileData[fileLength] = '\0'; fs.Dispose(); } catch (Exception ex) {