(glslang) Add more parentheses

This commit is contained in:
libretroadmin 2024-04-05 22:56:16 +02:00
parent b8d12a7d12
commit def0ce97b1

View File

@ -103,7 +103,7 @@ bool TInputScanner::consumeComment()
c = get(); c = get();
// if it's a two-character newline, skip both characters // if it's a two-character newline, skip both characters
if (c == '\r' && peek() == '\n') if ((c == '\r') && (peek() == '\n'))
get(); get();
c = get(); c = get();
} }
@ -185,14 +185,14 @@ bool TInputScanner::scanVersion(int& version, EProfile& profile, bool& notFirstT
if (lookingInMiddle) { if (lookingInMiddle) {
notFirstToken = true; notFirstToken = true;
// make forward progress by finishing off the current line plus extra new lines // make forward progress by finishing off the current line plus extra new lines
if (peek() == '\n' || peek() == '\r') { if ((peek() == '\n') || (peek() == '\r')) {
while (peek() == '\n' || peek() == '\r') while ((peek() == '\n') || (peek() == '\r'))
get(); get();
} else } else
do { do {
c = get(); c = get();
} while (c != EndOfInput && c != '\n' && c != '\r'); } while (c != EndOfInput && c != '\n' && c != '\r');
while (peek() == '\n' || peek() == '\r') while ((peek() == '\n') || (peek() == '\r'))
get(); get();
if (peek() == EndOfInput) if (peek() == EndOfInput)
return true; return true;