diff --git a/dtool/src/cppparser/cppPreprocessor.cxx b/dtool/src/cppparser/cppPreprocessor.cxx index f594291e0c..575811c759 100644 --- a/dtool/src/cppparser/cppPreprocessor.cxx +++ b/dtool/src/cppparser/cppPreprocessor.cxx @@ -1452,6 +1452,9 @@ get_preprocessor_args(int c, string &args) { // Following the command, the rest of the line, as well as any text on // successive lines, is part of the arguments to the command. + // Check for comments first. + c = skip_comment(c); + while (c != EOF && c != '\n') { if (c == '\\') { int next_c = get();