In worst case it makes the program crash. This fix, stores
the values. I'm not that experienced with C++ so could someone have
a second look at this there might very well be a "cleaner" way of
writing it.
Good find!
I think I would do it slightly different, the patch fixes the symptom
correctly by allocating new objects, but the underlying cause to me
seems that the original intention was to transfer the pointers (hence
the method's name) but that somehow got mangled with the transition from
old List to ::std::vector
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -288,7 +288,7 @@ void BreakPointList::transfer(BreakPointList& rList)
{
reset();
for (size_t i = 0; i< rList.size(); ++i)
- maBreakPoints.push_back( rList.at( i ) );
+ maBreakPoints.push_back( new BreakPoint(*rList.at( i )) );
rList.reset();
}
Instead of creating copies I'd do
- rList.reset();
+ rList.clear();
Please check if that fixes the problem.
Eike
That fixes the problem, and definitely looks like a cleaner solution. Do
you create the patch or should I create a new one?
I created and attached a patch for the pass count.
Description:
"Example: When entering pass count 2 it is expected that the breakpoint
is passed two times before breaking not to break the second time."
Thanks
Niklas Johansson
From 5a7b0a951cd85f09d3de06e740e521f435d59b4d Mon Sep 17 00:00:00 2001
From: Niklas Johansson <sleeping.pillow@gmail.com>
Date: Tue, 29 Nov 2011 09:32:14 +0100
Subject: [PATCH] Fixes pass count in Manage Breakpoints
When entering pass count 2 it is expected that the breakpoint is
passed two times before breaking not to break the second time.
---
basctl/source/basicide/baside2.cxx | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index fb6ed3a..b826300 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -724,7 +724,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...
}
--
1.7.5.4
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.