Prev Previous Post   Next Post Next
Old 31st January 2013, 14:27   #1
sols_HeG
Junior Member
 
Join Date: Aug 2011
Posts: 5
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:
code:

!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:
code:
!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.
sols_HeG is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump