Fix a bug where a faulty DBC file could crash the DBC editor

This commit is contained in:
Collin Kidder
2015-09-23 21:31:02 -04:00
parent 183a70310c
commit 239aad1feb
+2 -1
View File
@@ -373,8 +373,9 @@ void DBCSignalEditor::fillSignalForm(DBC_SIGNAL *sig)
int byt = startBit / 8;
bitpattern[byt] |= 1 << (startBit % 8);
size--;
if ((startBit % 8) == 0) startBit += 15;
if ((startBit % 8) == 0) startBit += 15;
else startBit--;
if (startBit > 63) startBit = 63;
}
}