Fixed a problem where the last line of UDMF maps were not parsed correctly

This commit is contained in:
biwa 2021-01-31 18:11:10 +01:00
parent d65fb7bbab
commit 2b6c7b44c2

View file

@ -191,11 +191,15 @@ namespace CodeImp.DoomBuilder.IO
while((cpErrorResult == 0) && (endofstruct == false))
{
// Get current character
if(line == data.Length - 1) break;
if(pos > data[line].Length - 1)
if (pos > data[line].Length - 1)
{
pos = 0;
line++;
// Stop if we have reached the end of the data
if (line == data.Length)
break;
if(string.IsNullOrEmpty(data[line])) continue; //mxd. Skip empty lines here so correct line number is displayed on errors
}