1
0
mirror of synced 2024-11-27 23:40:48 +01:00

adb: properly handle an incorrect adb status value

This commit is contained in:
Kevin Trocolli 2023-09-06 22:47:37 -04:00
parent 5499d38bb4
commit 238e39f415

View File

@ -78,7 +78,10 @@ class ADBHeader:
self.protocol_ver = protocol_ver # u16
self.cmd = cmd # u16
self.length = length # u16
self.status = ADBStatus(status) # u16
try:
self.status = ADBStatus(status) # u16
except ValueError as e:
raise ADBHeaderException(f"Status is incorrect! {e}")
self.game_id = game_id # 4 char + \x00
self.store_id = store_id # u32
self.keychip_id = keychip_id# 11 char + \x00