mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-01-18 19:52:09 +01:00
Fixed broken image dimensions checks
This commit is contained in:
parent
9e1e960c93
commit
e13d6dfc4b
@ -41,13 +41,13 @@ bool GmiFile::parse(QIODevice &device)
|
||||
_image = line.trimmed();
|
||||
else if (ln == 3) {
|
||||
width = line.toInt(&ok);
|
||||
if (!ok || ok <= 0) {
|
||||
if (!ok || width <= 0) {
|
||||
_errorString = "Invalid image width";
|
||||
return false;
|
||||
}
|
||||
} else if (ln == 4) {
|
||||
height = line.toInt(&ok);
|
||||
if (!ok || ok <= 0) {
|
||||
if (!ok || height <= 0) {
|
||||
_errorString = "Invalid image height";
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user