bugmonotone - Bugs: bug #15437, lua arrays ought to be indexed...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #15437: lua arrays ought to be indexed from 1, not 0

Submitted by:  Bruce Stephens <cenderis>
Submitted on:  Fri 13 Jan 2006 06:35:20 PM UTC  
 
Category: hook functionsSeverity: 3 - Normal
Item Group: code cleanupStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed
mtn version --full: 

Sun 15 Jan 2006 11:34:13 PM UTC, comment #1:

Patch applied in 10da429d849a3e826024602ae5ecef3dc45007b8 -- thanks!

Nathaniel Smith <njs>
Project Member
Fri 13 Jan 2006 06:35:20 PM UTC, original submission:

By convention, lua arrays indexed with integers start from 1, not 0, and the library functions assume that.

So shared_trust_function_body probably should create its array of signers from 1, not 0. Then someone can use table.getn in a hook, to write simple hooks like "I trust this if it's signed by at least 3 keys".

Bruce Stephens <cenderis>

 

Attached Files
file #2207:  lua.diff added by cenderis (533B - text/plain - patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Sun 15 Jan 2006 11:34:13 PM UTCnjsStatusNone=>Fixed
  Open/ClosedOpen=>Closed
Fri 13 Jan 2006 07:20:45 PM UTCcenderisAttached File-=>Added lua.diff, #3268

Back to the top


Powered by Savane 3.1-cleanup1