Skip to content

Commit c4e914f

Browse files
author
Brian MacIntosh
committed
fixed an exception in UnityTextReader with empty lines
1 parent a7de072 commit c4e914f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

UnityProjectBrowser/Parsers/Helpers/UnityTextReader.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ public override int Read()
5151
{
5252
return -1;
5353
}
54+
else if (m_currentCharacter == m_currentLine.Length)
55+
{
56+
// edge case: just read a new empty line
57+
m_currentCharacter++;
58+
return '\n';
59+
}
5460
else
5561
{
5662
return m_currentLine[m_currentCharacter++];

0 commit comments

Comments
 (0)