mirror of
https://github.com/hykilpikonna/AquaDX.git
synced 2026-08-09 04:29:03 -05:00
[F] maybe AdxHidInput index out bounds
This commit is contained in:
parent
c59d733534
commit
32e1e8cbf6
|
|
@ -30,14 +30,14 @@ public class AdxHidInput
|
|||
if (adxController1P != null)
|
||||
{
|
||||
var report1P = adxController1P.Read();
|
||||
if (report1P.Status == HidDeviceData.ReadStatus.Success)
|
||||
if (report1P.Status == HidDeviceData.ReadStatus.Success && report1P.Data.Length > 13)
|
||||
inputBuf1P = report1P.Data;
|
||||
}
|
||||
|
||||
if (adxController2P != null)
|
||||
{
|
||||
var report2P = adxController2P.Read();
|
||||
if (report2P.Status == HidDeviceData.ReadStatus.Success)
|
||||
if (report2P.Status == HidDeviceData.ReadStatus.Success && report2P.Data.Length > 13)
|
||||
inputBuf2P = report2P.Data;
|
||||
}
|
||||
}
|
||||
|
|
@ -123,4 +123,4 @@ public class AdxHidInput
|
|||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -28,7 +28,11 @@ public class OneKeyEntryEnd
|
|||
{
|
||||
if (!KeyListener.GetKeyDownOrLongPress(key, longPress)) return;
|
||||
MelonLogger.Msg("[QuickSkip] Activated");
|
||||
DoQuickSkip();
|
||||
}
|
||||
|
||||
public static void DoQuickSkip()
|
||||
{
|
||||
var traverse = Traverse.Create(SharedInstances.ProcessDataContainer.processManager);
|
||||
var processList = traverse.Field("_processList").GetValue<LinkedList<ProcessManager.ProcessControle>>();
|
||||
|
||||
|
|
@ -43,6 +47,8 @@ public class OneKeyEntryEnd
|
|||
case "Process.LoginBonus.LoginBonusProcess":
|
||||
case "Process.RegionalSelectProcess":
|
||||
case "Process.CharacterSelectProcess":
|
||||
// Typo in Assembly-CSharp
|
||||
case "Process.CharacterSelectProces":
|
||||
case "Process.TicketSelect.TicketSelectProcess":
|
||||
processToRelease = process.Process;
|
||||
break;
|
||||
|
|
@ -62,4 +68,4 @@ public class OneKeyEntryEnd
|
|||
SharedInstances.ProcessDataContainer.processManager.AddProcess(new FadeProcess(SharedInstances.ProcessDataContainer, processToRelease, new MusicSelectProcess(SharedInstances.ProcessDataContainer)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user