From 145a46686e1b974740ca520f03ba3b1e95da5388 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sun, 7 Feb 2021 11:53:10 +0100 Subject: [PATCH] Propper error checking --- src/map/IMG/img.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/map/IMG/img.cpp b/src/map/IMG/img.cpp index 1b866a95..cdff3e6c 100644 --- a/src/map/IMG/img.cpp +++ b/src/map/IMG/img.cpp @@ -105,7 +105,7 @@ IMG::IMG(const QString &fileName) : _fileName(fileName) : tile->addFile(this, tt); CHECK(subFile); - file.seek(offset + 0x20); + CHECK(file.seek(offset + 0x20)); for (int i = 0; i < 240; i++) { CHECK(readValue(file, block)); if (block == 0xFFFF) @@ -122,7 +122,7 @@ IMG::IMG(const QString &fileName) : _fileName(fileName) typ = _typ; if (typ) { - file.seek(offset + 0x20); + CHECK(file.seek(offset + 0x20)); for (int i = 0; i < 240; i++) { CHECK(readValue(file, block)); if (block == 0xFFFF)