diff --git a/pandatool/src/palettizer/txaFile.cxx b/pandatool/src/palettizer/txaFile.cxx index 1c6b242392..d509e779d8 100644 --- a/pandatool/src/palettizer/txaFile.cxx +++ b/pandatool/src/palettizer/txaFile.cxx @@ -188,7 +188,14 @@ int TxaFile:: get_line_or_semicolon(istream &in, string &line) { line = string(); int ch = in.get(); - while (ch != EOF && ch != '\n' && ch != ';') { + char semicolon = ';'; + + while (ch != EOF && ch != '\n' && ch != semicolon) { + if (ch == '#') { + // We don't consider a semicolon within a comment to be a line + // break. + semicolon = EOF; + } line += ch; ch = in.get(); }