Archive: Crash while using a Variable


Crash while using a Variable
Hey there,

since the last update (2.45-> 2.46) one of my scripts will not work any longer.

First a Variable is defined:


!define SER_NUM '01000000131242342361\
01000000134623424486\
01000000135234534532\
01000000136123423457'



after the script copied some files, it will check the Serial with a Macro and in this Macro the crash appears:
!macro checkSerialMacro userSerial Result
StrCpy $1 0
StrCpy $2 20
StrCpy $3 20
StrCpy $4 1
StrCpy ${Result} ''
StrCpy $0 ${SER_NUM} $2 $1 <-----Crash
loopbegin:
StrCmp $0 '' failed
StrCmp $0 ${userSerial} success
StrCpy $0 ${SER_NUM} $3 $2
IntOp $2 $2 + $3
Intop $4 $4 + 1
goto loopbegin
success:
StrCpy ${Result} 'success'
goto macroend
failed:
StrCpy $1 0
StrCpy $2 20
StrCpy $3 20
StrCpy $4 1
StrCpy ${Result} ''
StrCpy $0 ${SER_NUM_2} $2 $1
goto failedLoop
failedLoop:
StrCmp $0 '' failedSecond
StrCmp $0 ${userSerial} success
StrCpy $0 ${SER_NUM_2} $3 $2
IntOp $2 $2 + $3
Intop $4 $4 + 1
goto failedLoop
failedSecond:
StrCpy $1 0
StrCpy $2 20
StrCpy $3 20
StrCpy $4 1
StrCpy ${Result} ''
StrCpy $0 ${SER_NUM_3} $2 $1
goto failedLoopSecond
failedLoopSecond:
StrCmp $0 '' failedFinaly
StrCmp $0 ${userSerial} success
StrCpy $0 ${SER_NUM_3} $3 $2
IntOp $2 $2 + $3
Intop $4 $4 + 1
goto failedLoopSecond
failedFinaly:
StrCpy ${Result} 'failed'
macroend:
!macroend


Just when it trys to compile the row StrCpy $0 ${SER_NUM} $2 $1 it crashes.
If I delete the rows where I try to access the SER_NUM(or _2/3) the script will run without any problems.

Time 2 Close due tu stupidity...
Just use the large String build for large String functions ;)


Code like this should never crash, I'll take a look and see if I can reproduce it...


I was unable to reproduce this crash, please post a complete sample script here or on the bug tracker...