incomprehensible bug!? (from an idea of: passing parameters in a send call)

Dar Scott dsc at swcp.com
Tue May 23 17:41:47 EDT 2006


On May 23, 2006, at 9:28 AM, iMed Edition (AF) wrote:

> Who can understand why the test1() function will return TRUE and  
> test2() FALSE with the script below?

Yup.  Looks like a bug and a serious one.  Unless I'm not seeing  
something.

I checked this out on OS X 10.4.6 with 2.7.1 within 'repeat for each  
line tLine...'.

Works:

     put base64Decode(item 2 to -1 of tLine) into a[item 1 of tLine]

or
     get item 2 of tLine
     put base64Decode(it) into a[item 1 of tLine]

or

     get item 2 of tLine  -- !!!!!!!!!
     put base64Decode(item 2 of tLine) into a[item 1 of tLine]

Fails:

     put base64Decode(item 2 of tLine) into a[item 1 of tLine]

or

     put tLine into ttLine
     put base64Decode(item 2 of ttLine) into a[item 1 of tLine]


Checking just before does confirm that itemdel is numToChar(9) and  
the number of items in tLine is 2 and that tLine looks good.

To make this harder 'put item 2 of tLine' just before the decode  
fixes it, too, so this may be hard to debug.

In failure only three characters seem to decoded, except for line 35.

Dar Scott









More information about the use-livecode mailing list