mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
fix: Issues with various float nodes
This commit is contained in:
@@ -99,6 +99,9 @@ namespace hex::dp {
|
||||
if (attribute.getIOType() != Attribute::IOType::Out)
|
||||
throwNodeError("Tried to set output data of an input attribute!");
|
||||
|
||||
if (attribute.getType() != Attribute::Type::Buffer)
|
||||
throwNodeError("Tried to set buffer on non-buffer attribute!");
|
||||
|
||||
attribute.getOutputData() = { data.begin(), data.end() };
|
||||
}
|
||||
|
||||
@@ -111,6 +114,9 @@ namespace hex::dp {
|
||||
if (attribute.getIOType() != Attribute::IOType::Out)
|
||||
throwNodeError("Tried to set output data of an input attribute!");
|
||||
|
||||
if (attribute.getType() != Attribute::Type::Integer)
|
||||
throwNodeError("Tried to set integer on non-integer attribute!");
|
||||
|
||||
std::vector<u8> buffer(sizeof(integer), 0);
|
||||
std::memcpy(buffer.data(), &integer, sizeof(integer));
|
||||
|
||||
@@ -126,6 +132,9 @@ namespace hex::dp {
|
||||
if (attribute.getIOType() != Attribute::IOType::Out)
|
||||
throwNodeError("Tried to set output data of an input attribute!");
|
||||
|
||||
if (attribute.getType() != Attribute::Type::Float)
|
||||
throwNodeError("Tried to set float on non-float attribute!");
|
||||
|
||||
std::vector<u8> buffer(sizeof(floatingPoint), 0);
|
||||
std::memcpy(buffer.data(), &floatingPoint, sizeof(floatingPoint));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user