From 05d02e804ec064cae9d7af42d204d481afdf40ff Mon Sep 17 00:00:00 2001 From: Diegoisawesome Date: Wed, 13 Feb 2019 21:46:11 -0600 Subject: [PATCH] Fix C comment consumption logic --- tools/scaninc/c_file.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/scaninc/c_file.cpp b/tools/scaninc/c_file.cpp index d470f959d..595f366cb 100644 --- a/tools/scaninc/c_file.cpp +++ b/tools/scaninc/c_file.cpp @@ -134,7 +134,7 @@ bool CFile::ConsumeComment() if (m_buffer[m_pos] == '/' && m_buffer[m_pos + 1] == '*') { 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) return false;