mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +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; | 		QString cyl = tank_info[ti].name; | ||||||
| 		if (cyl == EMPTY_DIVE_STRING) | 		if (cyl == EMPTY_DIVE_STRING) | ||||||
| 			continue; | 			continue; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue