Skip to content

Commit

Permalink
Fixed a calculation mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
maxpat78 committed May 17, 2023
1 parent df9c461 commit 65ee8ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions FATtools/vhdutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -800,12 +800,12 @@ def mk_diff(name, base, overwrite='no'):
# It stores both absolute and relative pathnames, tough it isn't
# strictly necessary (but disk manager silently fixes this)
loc[0].dwPlatformCode = b'W2ru'
loc[0].dwPlatformDataSpace = ((len(rel_base)+512)//512)*512
loc[0].dwPlatformDataSpace = ((len(rel_base)+511)//512)*512
loc[0].dwPlatformDataLength = len(rel_base)
loc[0].dwPlatformDataOffset = 1536+bmpsize

loc[1].dwPlatformCode = b'W2ku'
loc[1].dwPlatformDataSpace = ((len(abs_base)+512)//512)*512
loc[1].dwPlatformDataSpace = ((len(abs_base)+511)//512)*512
loc[1].dwPlatformDataLength = len(abs_base)
loc[1].dwPlatformDataOffset = loc[0].dwPlatformDataOffset+loc[0].dwPlatformDataSpace

Expand Down

0 comments on commit 65ee8ed

Please sign in to comment.