From 0083479a80de831b0ae90877aa4f5d6c4670eb49 Mon Sep 17 00:00:00 2001 From: Niklas Johansson Date: Wed, 30 Nov 2011 13:33:26 +0100 Subject: Fixed fdo#42778 pass count in Manage Breakpoints and crash in dialog When entering pass count 2 it is expected that the breakpoint is passed two times before breaking not to break the second time. Also fixed a crash due to dangling pointers of breakpoints. --- basctl/source/basicide/baside2.cxx | 2 +- basctl/source/basicide/bastypes.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'basctl/source') diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index e963871c9bc8..0f425cf439b4 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -722,7 +722,7 @@ long ModulWindow::BasicBreakHdl( StarBASIC* pBasic ) if ( pBrk ) { pBrk->nHitCount++; - if ( pBrk->nHitCount < pBrk->nStopAfter && GetBasic()->IsBreak() ) + if ( pBrk->nHitCount <= pBrk->nStopAfter && GetBasic()->IsBreak() ) return aStatus.nBasicFlags; // go on... } diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 008fa996fddc..b1a67099df86 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -287,7 +287,7 @@ void BreakPointList::transfer(BreakPointList & rList) reset(); for (size_t i = 0; i < rList.size(); ++i) maBreakPoints.push_back( rList.at( i ) ); - rList.reset(); + rList.clear(); } void BreakPointList::InsertSorted( BreakPoint* pNewBrk ) -- cgit