mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
- append an empty line to thr RFS file to be parsed.
Looks like the parser needs the last line to be properly terminated.
This commit is contained in:
parent
8765b583f0
commit
d5c9768414
1 changed files with 3 additions and 2 deletions
|
@ -218,7 +218,7 @@ int RFS::Open(int lumpnum)
|
||||||
}
|
}
|
||||||
|
|
||||||
int fileSize = (int)hFile.GetLength();
|
int fileSize = (int)hFile.GetLength();
|
||||||
buffer.Resize(fileSize);
|
buffer.Resize(fileSize+1);
|
||||||
_ptr = buffer.Data();
|
_ptr = buffer.Data();
|
||||||
if (_ptr == NULL) {
|
if (_ptr == NULL) {
|
||||||
Printf("BARF: Not enough memory to read %d", lumpnum);
|
Printf("BARF: Not enough memory to read %d", lumpnum);
|
||||||
|
@ -226,11 +226,12 @@ int RFS::Open(int lumpnum)
|
||||||
}
|
}
|
||||||
|
|
||||||
hFile.Read(_ptr, fileSize);
|
hFile.Read(_ptr, fileSize);
|
||||||
|
buffer[fileSize] = '\n';
|
||||||
|
|
||||||
_curLine = 0;
|
_curLine = 0;
|
||||||
_pUnknown2 = _ptr;
|
_pUnknown2 = _ptr;
|
||||||
_curChar = '\n';
|
_curChar = '\n';
|
||||||
_pEnd = &_ptr[fileSize - 1];
|
_pEnd = &_ptr[fileSize];
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue