Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
omari is currently offline  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.
 
Read Message
Read Message
Previous Topic: DST issue in Time()
Next Topic: [BUG #1855, + PATCH] FormatIntAlpha oes not always give the right results.
Goto Forum:
  


Current Time: Thu Apr 25 08:44:34 CEST 2024

Total time taken to generate the page: 0.02784 seconds