Skip to content

Commit

Permalink
return fd.filenum after writing to upgrade section
Browse files Browse the repository at this point in the history
  • Loading branch information
salhk committed Feb 29, 2024
1 parent bc4d5cb commit 6c14b04
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions upgrade/upgrade.tbs
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,13 @@ set_sector:
fd.setbuffer(fw, 128)
fd.setsector(current_fw_upg_state.fw_sector)
#ELSE
dim prev_num as byte=fd.filenum
dim fd_status as pl_fd_status_codes
fd.filenum=filenum_open("UPG",FIRMWARE_UPGRADE_FILENAME,fd_status)
fd.setpointer(fd.filesize+1)
fd.setdata(fw_buffer)
fd.setdata(fw)
fd.filenum=prev_num
#ENDIF
current_fw_upg_state.fw_sector = current_fw_upg_state.fw_sector + 1
end if
Expand Down

0 comments on commit 6c14b04

Please sign in to comment.