Skip to content

Commit 97988ad

Browse files
committed
Zero out FileDateMS and write unix timestamp to FileDateLS.
1 parent eb8214d commit 97988ad

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

demo/xtra/PE95TIME.LUA

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ function O()
1111
for _=1,n do local u,o=F:seek(),F:read(8):gsub("\0.*","")F:seek(C,4)J=R(4)F:seek(C,4)K=R(4)F:seek(S,u+40)if o==".rsrc"then return end end error("!rsrc")end
1212
function B(p,s)
1313
F:seek(S,(p-J)+K)local d,t,k=F:read(s),("VS_VERSION_INFO"):gsub(".","\0%1").."\0\0"k=d:find(t,1,true)
14-
if k then k=k+#t+((4-((k+#t)%4))%4)+44 F:seek(C,k-s)d,t=R(4),R(4)
15-
print(string.format("FileDateMS = 0x%X\nFileDateLS = 0x%X",d,t))
16-
end
14+
if k then k=k+#t+((4-((k+#t)%4))%4)+44 d,t=F:seek()+(k-s)W(d,0)W(d+4,V)end
1715
end
1816
function A(o,l,v)
1917
local d,n,i,t,e=K+o+4 W(d,V)F:seek(C,4)n,i=R(2),R(2)t,e=n+i,d+12

0 commit comments

Comments
 (0)