]> git.lyx.org Git - lyx.git/blobdiff - src/lyxlex.C
Fix crash when running lyx -dbg insets -e ...
[lyx.git] / src / lyxlex.C
index 9c23930a7444bba5329b5af5cc59f477f515802b..3512d48449714753c8dde2fa0d42246cc24527a7 100644 (file)
@@ -3,7 +3,7 @@
  * 
  *           LyX, The Document Processor
  *
- *           Copyright 1996-2000 The LyX Team.
+ *           Copyright 1996-2001 The LyX Team.
  *
  *   Generalized simple lexical analizer.
  *   It can be used for simple syntax parsers, like lyxrc,
@@ -104,6 +104,11 @@ void LyXLex::setStream(istream & i)
 }
 
 
+void LyXLex::setCommentChar(char c)
+{
+       pimpl_->setCommentChar(c);
+}
+
 int LyXLex::lex()
 {
        return pimpl_->lex();
@@ -177,7 +182,7 @@ string const LyXLex::getLongString(string const & endtoken)
                        } 
 
                        if (!prefix.empty() 
-                           && prefixIs(tmpstr, prefix.c_str())) {
+                           && prefixIs(tmpstr, prefix)) {
                                tmpstr.erase(0, prefix.length() - 1);
                        }
                        str += frontStrip(tmpstr, "\t") + '\n';