From b850c2d7fe9015e8e48bc3c148340bab86947278 Mon Sep 17 00:00:00 2001 From: baldurk Date: Wed, 6 Oct 2021 15:05:24 +0100 Subject: [PATCH] Fix incorrect use of QByteArray::fromRawData, it doesn't copy input data --- renderdoc/api/replay/rdcarray.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/renderdoc/api/replay/rdcarray.h b/renderdoc/api/replay/rdcarray.h index f86dfb509..cb46f9dbf 100644 --- a/renderdoc/api/replay/rdcarray.h +++ b/renderdoc/api/replay/rdcarray.h @@ -931,9 +931,6 @@ struct bytebuf : public rdcarray resize(in.size()); memcpy(elems, in.data(), (size_t)in.size()); } - operator QByteArray() const - { - return QByteArray::fromRawData((const char *)elems, (int32_t)usedCount); - } + operator QByteArray() const { return QByteArray((const char *)elems, (int32_t)usedCount); } #endif };