16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 01:19:19 +02:00

maintenance: fixes for some of cppcheck warnings

This commit is contained in:
tmj-fstate
2019-10-24 23:03:39 +02:00
parent 27d5b55ca6
commit d24fccb4d7
14 changed files with 113 additions and 134 deletions

View File

@@ -8416,10 +8416,11 @@ bool TMoverParameters::readCompressorList(std::string const &Input) {
return false;
}
int idx = LISTLINE++;
if (idx > 8) {
if (idx > 8 - 1) {
WriteLog("Read CompressorList: number of entries exceeded capacity of the data table");
return false;
}
// NOTE: content of slot [x][0] is hardcoded elsewhere
parser
>> CompressorList[ 0 ][ idx + 1 ]
>> CompressorList[ 1 ][ idx + 1 ]