mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-21 05:05:44 +00:00
Correctly handle long format elements
This commit is contained in:
@@ -903,7 +903,9 @@ QVariantList FormatElement::GetVariants(const byte *&data, const byte *end) cons
|
||||
}
|
||||
else if(format.compType == CompType::SInt)
|
||||
{
|
||||
if(format.compByteWidth == 4)
|
||||
if(format.compByteWidth == 8)
|
||||
ret.push_back((int64_t)readObj<int64_t>(data, end, ok));
|
||||
else if(format.compByteWidth == 4)
|
||||
ret.push_back((int)readObj<int32_t>(data, end, ok));
|
||||
else if(format.compByteWidth == 2)
|
||||
ret.push_back((int)readObj<int16_t>(data, end, ok));
|
||||
@@ -912,7 +914,9 @@ QVariantList FormatElement::GetVariants(const byte *&data, const byte *end) cons
|
||||
}
|
||||
else if(format.compType == CompType::UInt)
|
||||
{
|
||||
if(format.compByteWidth == 4)
|
||||
if(format.compByteWidth == 8)
|
||||
ret.push_back((uint64_t)readObj<uint64_t>(data, end, ok));
|
||||
else if(format.compByteWidth == 4)
|
||||
ret.push_back((uint32_t)readObj<uint32_t>(data, end, ok));
|
||||
else if(format.compByteWidth == 2)
|
||||
ret.push_back((uint32_t)readObj<uint16_t>(data, end, ok));
|
||||
|
||||
Reference in New Issue
Block a user