mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-02-26 04:00:49 +01:00
Propper error checking
This commit is contained in:
parent
065d52d98b
commit
145a46686e
@ -105,7 +105,7 @@ IMG::IMG(const QString &fileName) : _fileName(fileName)
|
|||||||
: tile->addFile(this, tt);
|
: tile->addFile(this, tt);
|
||||||
CHECK(subFile);
|
CHECK(subFile);
|
||||||
|
|
||||||
file.seek(offset + 0x20);
|
CHECK(file.seek(offset + 0x20));
|
||||||
for (int i = 0; i < 240; i++) {
|
for (int i = 0; i < 240; i++) {
|
||||||
CHECK(readValue(file, block));
|
CHECK(readValue(file, block));
|
||||||
if (block == 0xFFFF)
|
if (block == 0xFFFF)
|
||||||
@ -122,7 +122,7 @@ IMG::IMG(const QString &fileName) : _fileName(fileName)
|
|||||||
typ = _typ;
|
typ = _typ;
|
||||||
|
|
||||||
if (typ) {
|
if (typ) {
|
||||||
file.seek(offset + 0x20);
|
CHECK(file.seek(offset + 0x20));
|
||||||
for (int i = 0; i < 240; i++) {
|
for (int i = 0; i < 240; i++) {
|
||||||
CHECK(readValue(file, block));
|
CHECK(readValue(file, block));
|
||||||
if (block == 0xFFFF)
|
if (block == 0xFFFF)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user