Home » U++ Library support » U++ Core » [BUG #1854] SegFault when calling CParser::NoSkipComments() before term initialisation
[BUG #1854] SegFault when calling CParser::NoSkipComments() before term initialisation [message #49692] |
Wed, 04 April 2018 13:58 |
omari
Messages: 265 Registered: March 2010
|
Experienced Member |
|
|
because the constructor CParser(const char*) call Spaces(); that consum any space and any comment in the start of the parsed String,
i decided to use CParser like this:
void TestCParser() {
String s = " some text ";
CParser p;
p.NoSkipComments();
p.Set(s);
}
investigation :
CParser& NoSkipComments() { return SkipComments(false); }
CParser& CParser::SkipComments(bool b)
{
skipcomments = b;
term = wspc;
Spaces0(); <---
return *this;
}
SkipComments is ambiguous,
if it is a setter, it must be a setter only,
if it is a procedure, it must not change the value of "skipcomments"
regards
omari.
|
|
|
Goto Forum:
Current Time: Sat May 04 13:55:30 CEST 2024
Total time taken to generate the page: 0.02429 seconds
|