From 2d232f41696be5a6915af4c754e0d22a6a210229 Mon Sep 17 00:00:00 2001 From: spumopiuri <31506481+spumopiuri@users.noreply.github.com> Date: Thu, 31 Aug 2017 12:03:40 +0200 Subject: [PATCH] Update tlv.cpp Missing cast to unsigned type; added it to avoid problem with a value greater than 127. --- libndef/tlv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libndef/tlv.cpp b/libndef/tlv.cpp index eeecfef..50a2247 100644 --- a/libndef/tlv.cpp +++ b/libndef/tlv.cpp @@ -125,7 +125,7 @@ TlvList Tlv::fromByteArray(const QByteArray& data, quint64 offset) { if ((count - index) > 0) { - quint16 length = buffer.at(index); + quint16 length = (quint8)buffer.at(index); ++index; if (length > 0xFE)