Fix MSVC warning: Invalid data: accessing 'm_DeviceName', the readable size is '6240' bytes, but '-240' bytes might be read
This commit is contained in:
parent
21aeffd6c6
commit
9967b72d83
|
@ -1085,6 +1085,11 @@ void XBController::ReorderObjects(const char *szDeviceName, int pos)
|
|||
{
|
||||
old = v;
|
||||
break;
|
||||
} else {
|
||||
// If old device name was not found, do not continue
|
||||
// int old will equal -1, which leads to an out-of-bounds
|
||||
// memory access below
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue