From 4974c1615d0246e2bb6072f11ca14c6270ffba6e Mon Sep 17 00:00:00 2001 From: David Rose Date: Sun, 19 Dec 2004 16:43:11 +0000 Subject: [PATCH] allow a semicolon within a comment --- pandatool/src/palettizer/txaFile.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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(); }