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.
This commit is contained in:
@@ -802,7 +802,8 @@ MemoryView::_GetSelectedText(BString& text)
|
|||||||
|
|
||||||
char buffer[32];
|
char buffer[32];
|
||||||
for (int32 i = 0; i < count; i++) {
|
for (int32 i = 0; i < count; i++) {
|
||||||
_GetNextHexBlock(buffer, sizeof(buffer), data);
|
_GetNextHexBlock(buffer, std::min(_GetHexDigitsPerBlock() + 1,
|
||||||
|
(int32)32), data);
|
||||||
data += blockSize;
|
data += blockSize;
|
||||||
text << buffer;
|
text << buffer;
|
||||||
if (i < count - 1)
|
if (i < count - 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user