mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
fix: Make RGBA8 visualizer node only copy the data it needs
This commit is contained in:
@@ -346,7 +346,9 @@ namespace hex::plugin::builtin {
|
||||
if (requiredBytes > rawData.size())
|
||||
throwNodeError(fmt::format("Image requires at least {} bytes of data, but only {} bytes are available", requiredBytes, rawData.size()));
|
||||
|
||||
m_data = rawData;
|
||||
m_data.clear();
|
||||
m_data.resize(requiredBytes);
|
||||
std::copy_n(rawData.data(), requiredBytes, m_data.data());
|
||||
m_width = width;
|
||||
m_height = height;
|
||||
m_texture.reset();
|
||||
|
||||
Reference in New Issue
Block a user