diff options
Diffstat (limited to 'lldb/source/Core/RegisterValue.cpp')
| -rw-r--r-- | lldb/source/Core/RegisterValue.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lldb/source/Core/RegisterValue.cpp b/lldb/source/Core/RegisterValue.cpp index ab24567ba12..16559e2b478 100644 --- a/lldb/source/Core/RegisterValue.cpp +++ b/lldb/source/Core/RegisterValue.cpp @@ -981,12 +981,11 @@ RegisterValue::SetBytes (const void *bytes, size_t length, lldb::ByteOrder byte_ // m_data.buffer.bytes, or make it something that is allocated on // the heap. Since the data buffer is in a union, we can't make it // a collection class like SmallVector... - assert (length <= sizeof (m_data.buffer.bytes)); if (bytes && length > 0) { + assert (length <= sizeof (m_data.buffer.bytes) && "Storing too many bytes in a RegisterValue."); m_type = eTypeBytes; m_data.buffer.length = length; - assert (length <= sizeof (m_data.buffer.bytes)); memcpy (m_data.buffer.bytes, bytes, length); m_data.buffer.byte_order = byte_order; } |

