mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-30 15:52:09 +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
|
// If the last character in the buffer is a null character, change
|
||||||
// it to a newline. Otherwise, append a newline to the end.
|
// 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.LockBuffer()[ScriptBuffer.Len() - 1] = '\n';
|
||||||
ScriptBuffer.UnlockBuffer();
|
ScriptBuffer.UnlockBuffer();
|
||||||
|
|
Loading…
Reference in a new issue