mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-13 07:31:04 +00:00
Revert "- fixed allocation size when constructing a string from a file system entry."
This reverts commit 513d8cea8d
.
This change broke voxel loading and possibly other things as well
This commit is contained in:
parent
664ccf8a7c
commit
8cba80a2cd
1 changed files with 6 additions and 6 deletions
|
@ -1608,17 +1608,17 @@ FileData::~FileData ()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
FString::FString(ELumpNum lumpnum)
|
FString::FString (ELumpNum lumpnum)
|
||||||
{
|
{
|
||||||
auto lumpr = fileSystem.OpenFileReader((int)lumpnum);
|
auto lumpr = fileSystem.OpenFileReader ((int)lumpnum);
|
||||||
auto size = lumpr.GetLength();
|
auto size = lumpr.GetLength ();
|
||||||
AllocBuffer(size);
|
AllocBuffer (1 + size);
|
||||||
auto numread = lumpr.Read(&Chars[0], size);
|
auto numread = lumpr.Read (&Chars[0], size);
|
||||||
Chars[size] = '\0';
|
Chars[size] = '\0';
|
||||||
|
|
||||||
if (numread != size)
|
if (numread != size)
|
||||||
{
|
{
|
||||||
I_Error("ConstructStringFromLump: Only read %ld of %ld bytes on lump %i (%s)\n",
|
I_Error ("ConstructStringFromLump: Only read %ld of %ld bytes on lump %i (%s)\n",
|
||||||
numread, size, lumpnum, fileSystem.GetFileFullName((int)lumpnum));
|
numread, size, lumpnum, fileSystem.GetFileFullName((int)lumpnum));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue