mirror of
https://github.com/TangentFoxy/love-pe.git
synced 2025-07-28 02:02:16 +00:00
Fix relocation data directory corruption
This commit is contained in:
@@ -780,12 +780,6 @@ function icapi.replaceIcon(exeFile,icoFile,newFile)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for id, Directory in ipairs(DataDirectories) do
|
|
||||||
if Directory[1] > Sections[RSRC_ID].VirtualAddress then
|
|
||||||
Directory[1] = Directory[1] + ShiftOffset
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
--Copy the DOS,PE,COFF and PEOpt headers
|
--Copy the DOS,PE,COFF and PEOpt headers
|
||||||
exeFile:seek(0)
|
exeFile:seek(0)
|
||||||
newFile:write(exeFile:read(DataDirectoriesOffset))
|
newFile:write(exeFile:read(DataDirectoriesOffset))
|
||||||
|
Reference in New Issue
Block a user