From a50513e561a6f6de9c0cdfa1f173e90087efc683 Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 6 Sep 2019 22:18:18 +0100 Subject: [PATCH] Correctly handle long format elements --- qrenderdoc/Code/FormatElement.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qrenderdoc/Code/FormatElement.cpp b/qrenderdoc/Code/FormatElement.cpp index 695d02b64..fae70325d 100644 --- a/qrenderdoc/Code/FormatElement.cpp +++ b/qrenderdoc/Code/FormatElement.cpp @@ -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(data, end, ok)); + else if(format.compByteWidth == 4) ret.push_back((int)readObj(data, end, ok)); else if(format.compByteWidth == 2) ret.push_back((int)readObj(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(data, end, ok)); + else if(format.compByteWidth == 4) ret.push_back((uint32_t)readObj(data, end, ok)); else if(format.compByteWidth == 2) ret.push_back((uint32_t)readObj(data, end, ok));