Cleanup: avoid out of bounds access
sizeof() is clearly the wrong way to get to the size of that array... Coverity CID 208290 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
b4b8a9db4e
commit
04bca45552
@ -280,7 +280,7 @@ QStringList DiveObjectHelper::cylinderList() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (unsigned long ti = 0; ti < sizeof(tank_info) && tank_info[ti].name != NULL; ti++) {
|
for (unsigned long ti = 0; ti < MAX_TANK_INFO && tank_info[ti].name != NULL; ti++) {
|
||||||
QString cyl = tank_info[ti].name;
|
QString cyl = tank_info[ti].name;
|
||||||
if (cyl == EMPTY_DIVE_STRING)
|
if (cyl == EMPTY_DIVE_STRING)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user