mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 20:23:25 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
if (cyl == EMPTY_DIVE_STRING)
|
||||
continue;
|
||||
|
|
Loading…
Add table
Reference in a new issue