[X] '$put or $puts in $if' bug


#1

Hi,

I've found a bug in MP3Tag v2.39 (and it remains in v2.39a) export.
If I put a $put or $puts command in the second or third place (in place of 'do if true', 'do if false') in an $if statement, the command will be executed independently of my conditions.

Here is a stupid example, run it some audio files having fields ARTIST and TRACK:

$filename(test.txt)$loop($num(%track%,2))
$num(%track%,2)
$if(%artist%,Artist OK,$put(ctr,$num(%track%,2) no artist))
%artist% - $get(ctr)
$loopend()

As you can see, the variable ctr should be nothing if the audio file has the field ARTIST. BUT it changes in every iteration.

st


#2

No, you must place $put before the $if like here:
/t/3144/1


#3

Thank you very much. :slight_smile:

st