From: SourceForge.net <no...@so...> - 2005-07-26 09:57:48
|
Bugs item #1235875, was opened at 2005-07-11 01:10 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373085&aid=1235875&group_id=22049 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Plugin Group: 2.0 Series Status: Open Resolution: None Priority: 5 Submitted By: Diego Marcos (deguix) Assigned to: Nobody/Anonymous (nobody) Summary: Math: "l" function has problem when array is dyn. allocated Initial Comment: The "l" function which returns the length of an array shows wrongly the number of items when the array is dynamically allocated. Whenever the number of items is even, it increments the value by 1. Examples (using Math Test script): a = {} r0 = l(a) This returns 1. Wrong. a = {} a[0] = "1" r0 = l(a) This returns 1. Right. a = {} a[0] = "1" a[1] = "2" r0 = l(a) This returns 3. Wrong. ... NSIS Version: 2.07 as released (no nightly builds). ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2005-07-26 02:57 Message: Logged In: NO Nop, it still doesn't work: a = {} a[0] = "1" a[1] = "2" a[2] = 0 r0 = l(a) gives the same exact "3". ---------------------------------------------------------------------- Comment By: Amir Szekely (kichik) Date: 2005-07-23 03:53 Message: Logged In: YES user_id=584402 It might be treating the arary as a string. In this case, there's no null termination and that could cause the wrong result. I haven't looked into it yet, but it reminds me of this one: http://forums.winamp.com/showthread.php?s=&threadid=192177&highlight=null ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373085&aid=1235875&group_id=22049 |