Fix C comment consumption logic

This commit is contained in:
Diegoisawesome 2019-02-13 21:46:11 -06:00
parent 047c282763
commit 05d02e804e

View File

@ -134,7 +134,7 @@ bool CFile::ConsumeComment()
if (m_buffer[m_pos] == '/' && m_buffer[m_pos + 1] == '*') if (m_buffer[m_pos] == '/' && m_buffer[m_pos + 1] == '*')
{ {
m_pos += 2; m_pos += 2;
while (m_buffer[m_pos] != '*' && m_buffer[m_pos + 1] != '/') while (m_buffer[m_pos] != '*' || m_buffer[m_pos + 1] != '/')
{ {
if (m_buffer[m_pos] == 0) if (m_buffer[m_pos] == 0)
return false; return false;