From 821790fa91cfefbab05767e6be4f344175bf389d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sat, 26 Dec 2020 14:30:18 +0100 Subject: [PATCH] Code cleanup --- src/map/IMG/style.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/map/IMG/style.cpp b/src/map/IMG/style.cpp index f6997120..fb51871e 100644 --- a/src/map/IMG/style.cpp +++ b/src/map/IMG/style.cpp @@ -496,22 +496,10 @@ static bool readColor(SubFile *file, SubFile::Handle &hdl, QColor &color) static bool skipLocalization(SubFile *file, SubFile::Handle &hdl) { - quint8 t8; - quint16 len; + quint32 len; - if (!file->readUInt8(hdl, t8)) + if (!file->readVUInt32(hdl, len)) return false; - len = t8; - - if (len & 0x01) - len = len >> 1; - else { - if (!file->readUInt8(hdl, t8)) - return false; - len = (((quint16)t8) << 8) | len; - len = len >> 2; - } - if (!file->seek(hdl, file->pos(hdl) + len)) return false;