SkipToNewLine() fixed: did not work with a / at the end of a line

This commit is contained in:
ceriel 1994-10-28 15:26:36 +00:00
parent 8061bab6a9
commit c7b707c266
2 changed files with 4 additions and 2 deletions

View file

@ -81,12 +81,13 @@ SkipToNewLine()
delim = ch; delim = ch;
garbage = 1; garbage = 1;
} else if (ch == '/') { } else if (ch == '/') {
if ((ch = GetChar()) == '*' if (GetChar() == '*'
&& !InputLevel && !InputLevel
) { ) {
skipcomment(); skipcomment();
continue; continue;
} }
else UnGetChar();
} }
else if (ch == TOKSEP && InputLevel) { else if (ch == TOKSEP && InputLevel) {
continue; continue;

View file

@ -74,10 +74,11 @@ SkipToNewLine()
delim = ch; delim = ch;
garbage = 1; garbage = 1;
} else if (ch == '/') { } else if (ch == '/') {
if ((ch = GetChar()) == '*' && !InputLevel) { if (GetChar() == '*' && !InputLevel) {
skipcomment(); skipcomment();
continue; continue;
} }
else UnGetChar();
} }
else if (ch == TOKSEP && InputLevel) { else if (ch == TOKSEP && InputLevel) {
continue; continue;