mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-27 06:12:19 +00:00
- Fixed: The scanner triggered an assertion failure on empty strings.
SVN r3321 (trunk)
This commit is contained in:
parent
cffae9c33c
commit
7d348e7148
1 changed files with 1 additions and 1 deletions
|
@ -239,7 +239,7 @@ void FScanner::PrepareScript ()
|
|||
{
|
||||
// If the last character in the buffer is a null character, change
|
||||
// it to a newline. Otherwise, append a newline to the end.
|
||||
if (ScriptBuffer[ScriptBuffer.Len() - 1] == '\0')
|
||||
if (ScriptBuffer.Len() > 0 && ScriptBuffer[ScriptBuffer.Len() - 1] == '\0')
|
||||
{
|
||||
ScriptBuffer.LockBuffer()[ScriptBuffer.Len() - 1] = '\n';
|
||||
ScriptBuffer.UnlockBuffer();
|
||||
|
|
Loading…
Reference in a new issue