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 » Developing U++ » U++ TheIDE and Library: Releases and ChangeLogs » Hopefully fixed "Writes to freed blocks" bug in ide - and warning (quiz)
Hopefully fixed "Writes to freed blocks" bug in ide - and warning (quiz) [message #12268] Mon, 22 October 2007 18:51 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Ok, so the problem was in this function:

void EditorBar::InsertLines(int i, int count) {
	li.InsertN(minmax(i, 0, li.GetCount()), max(count, 0));
	if(editor->GetCheckEdited()) {
		if(editor->IsUndoOp() && li_removed.GetCount() >= count) {
			for(int t = 0; t < count; t++) {
				li.At(i + t).firstedited = li_removed[li_removed.GetCount() - count + t].firstedited;
				li[i + t].edited = li_removed[li_removed.GetCount() - count + t].edited;
			}
			li_removed.Drop(count);
			SetEdited(i + count, 1);
			ignored_next_edit = true;
		}
		else {
			if (li[i].firstedited == 0)
				li[i].firstedited = li.At(i + count).firstedited;
			SetEdited(i + 1, count);
		}
	}
	Refresh();
}


Quiz: Where is the bug?

Just to make it easier: It is a very ugly catch that Upp::Vector shares with std::vector .... and with MSC it works...

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: "init" files in packages...
Next Topic: ProgessIndicator::SetColor
Goto Forum:
  


Current Time: Sat Apr 27 09:16:46 CEST 2024

Total time taken to generate the page: 0.02137 seconds