Fix Some Bugs

master CI_BUILD_44
ColdWindScholar 2023-11-11 06:46:49 +08:00
parent 69cdc2e7bd
commit c657bb0ed9
1 changed files with 1 additions and 2 deletions

View File

@ -224,8 +224,7 @@ class sdat2img:
with open(self.TRANSFER_LIST_FILE, 'r') as trans_list:
# First line in transfer list is the version number
# Second line in transfer list is the total number of blocks we expect to write
new_blocks = int(trans_list.readline())
if version := int(trans_list.readline()) >= 2:
if (version := int(trans_list.readline())) >= 2 and (new_blocks := int(trans_list.readline())):
# Third line is how many stash entries are needed simultaneously
trans_list.readline()
# Fourth line is the maximum number of blocks that will be stashed simultaneously