[haiku-commits] haiku: hrev46073 - src/apps/debugger/user_interface/gui/inspector_window

  • From: anevilyak@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 16 Sep 2013 20:24:04 +0200 (CEST)

hrev46073 adds 1 changeset to branch 'master'
old head: af967edb7d20fe472ac7dc2c013e13fcbc249ca3
new head: fb916bc870d42cb7980c244b337edcda4be82c36
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=fb916bc+%5Eaf967ed

----------------------------------------------------------------------------

fb916bc: Debugger: Fix data copy issue.
  - B_PRIx8 unfortunately doesn't necessarily strictly stay within the bounds
    of an 8-bit hex constant, so force the size passed to snprintf to make it
    that way.

                                      [ Rene Gollent <anevilyak@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev46073
Commit:      fb916bc870d42cb7980c244b337edcda4be82c36
URL:         http://cgit.haiku-os.org/haiku/commit/?id=fb916bc
Author:      Rene Gollent <anevilyak@xxxxxxxxx>
Date:        Mon Sep 16 18:22:24 2013 UTC

----------------------------------------------------------------------------

1 file changed, 2 insertions(+), 1 deletion(-)
.../debugger/user_interface/gui/inspector_window/MemoryView.cpp    | 3 ++-

----------------------------------------------------------------------------

diff --git 
a/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp 
b/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp
index 4c945d0..4f2979d 100644
--- a/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp
+++ b/src/apps/debugger/user_interface/gui/inspector_window/MemoryView.cpp
@@ -802,7 +802,8 @@ MemoryView::_GetSelectedText(BString& text)
 
        char buffer[32];
        for (int32 i = 0; i < count; i++) {
-               _GetNextHexBlock(buffer, sizeof(buffer), data);
+               _GetNextHexBlock(buffer, std::min(_GetHexDigitsPerBlock() + 1,
+                               (int32)32),     data);
                data += blockSize;
                text << buffer;
                if (i < count - 1)


Other related posts:

  • » [haiku-commits] haiku: hrev46073 - src/apps/debugger/user_interface/gui/inspector_window - anevilyak