Small fix for potential crash bug in UDS scanner

This commit is contained in:
Collin Kidder
2016-02-26 14:16:23 -05:00
parent 3bc8d120cb
commit 403689c214
+3 -1
View File
@@ -121,7 +121,9 @@ void UDSScanWindow::updatedFrames(int numFrames)
id = thisFrame.ID;
id -= ui->spinReplyOffset->value(); //back to original ECU id
if (id == sendingFrames[currIdx].ID)
int numFrames = sendingFrames.length();
if (numFrames > 0 && numFrames > currIdx && id == sendingFrames[currIdx].ID)
{
if (thisFrame.data[1] == 0x40 + sendingFrames[currIdx].data[1])
{