From 4c43e5395e8ef71e79a88fb9b8ef2df70c70d7c6 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Mon, 14 Nov 2011 18:49:53 -0500 Subject: [PATCH] Fix incorrect storage of breakpoints. When a breakpoint is asked to archive itself to a message, ensure that the message is empty before writing. Fixes breakpoints past the first one being broken on restore due to each breakpoint archive containing the combined settings of all previous breakpoints. --- src/apps/debugger/settings/BreakpointSetting.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/apps/debugger/settings/BreakpointSetting.cpp b/src/apps/debugger/settings/BreakpointSetting.cpp index 4a738f5627..ca960f34d3 100644 --- a/src/apps/debugger/settings/BreakpointSetting.cpp +++ b/src/apps/debugger/settings/BreakpointSetting.cpp @@ -102,6 +102,8 @@ BreakpointSetting::WriteTo(BMessage& archive) const if (fFunctionID == NULL) return B_BAD_VALUE; + archive.MakeEmpty(); + status_t error; if ((error = ArchivingUtils::ArchiveChild(fFunctionID, archive, "function")) != B_OK