- refactored all places which treated FileData as zero terminated.
This commit is contained in:
parent
79e6d068a9
commit
2c2bf0265f
19 changed files with 63 additions and 47 deletions
|
|
@ -200,8 +200,11 @@ void FScanner :: OpenLumpNum (int lump)
|
|||
{
|
||||
Close ();
|
||||
{
|
||||
FileData mem = fileSystem.ReadFile(lump);
|
||||
ScriptBuffer = mem.GetString();
|
||||
auto mem = fileSystem.OpenFileReader(lump);
|
||||
auto buff = ScriptBuffer.LockNewBuffer(mem.GetLength());
|
||||
mem.Read(buff, mem.GetLength());
|
||||
buff[mem.GetLength()] = 0;
|
||||
ScriptBuffer.UnlockBuffer();
|
||||
}
|
||||
ScriptName = fileSystem.GetFileFullPath(lump).c_str();
|
||||
LumpNum = lump;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue