View Single Post
Old 5th May 2010, 08:10   #2
jpderuiter
Major Dude
 
Join Date: Feb 2007
Posts: 672
Yes, there's a flaw in the GetTime function:
PHP Code:
FileFunc_GetTime_convert:
    
System::Call '*$7(&i2,&i2,&i2,&i2,&i2,&i2,&i2,&i2)i(.r5,.r6,.r4,.r0,.r3,.r2,.r1,)'
    
System::Free $7
 
    IntCmp 
$0 9 0 0 +2
    StrCpy 
$'0$0'
    
IntCmp $1 9 0 0 +2
    StrCpy 
$'0$1'
    
IntCmp $2 9 0 0 +2
    StrCpy 
$'0$2'
    
IntCmp $6 9 0 0 +2
    StrCpy 
$'0$6' 
should be:
PHP Code:
FileFunc_GetTime_convert:
    
System::Call '*$7(&i2,&i2,&i2,&i2,&i2,&i2,&i2,&i2)i(.r5,.r6,.r4,.r0,.r3,.r2,.r1,)'
    
System::Free $7
 
    IntCmp 
$0 9 0 0 +2
    StrCpy 
$'0$0'
    
IntCmp $1 9 0 0 +2
    StrCpy 
$'0$1'
    
IntCmp $2 9 0 0 +2
    StrCpy 
$'0$2'
    
IntCmp $3 9 0 0 +Added for leading zero for the hours
    StrCpy 
$'0$3'    Added for leading zero for the hours
    IntCmp 
$6 9 0 0 +2
    StrCpy 
$'0$6' 

Last edited by jpderuiter; 5th May 2010 at 08:25. Reason: Changed to [convert] label used in FileFunc header instead of the code on Wiki
jpderuiter is offline   Reply With Quote