Small fix for potential crash bug in UDS scanner
This commit is contained in:
+3
-1
@@ -121,7 +121,9 @@ void UDSScanWindow::updatedFrames(int numFrames)
|
|||||||
id = thisFrame.ID;
|
id = thisFrame.ID;
|
||||||
|
|
||||||
id -= ui->spinReplyOffset->value(); //back to original ECU 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])
|
if (thisFrame.data[1] == 0x40 + sendingFrames[currIdx].data[1])
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user