URL:
  <http://gna.org/bugs/?24412>

                 Summary: Inserting into the last element of an array creates
empty index
                 Project: Battle for Wesnoth
            Submitted by: pentarctag0n
            Submitted on: Sun 14 Feb 2016 08:37:21 PM UTC
                Category: Bug
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: WML
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 1.13.2+dev
        Operating System: Linux Mint

    _______________________________________________________

Details:

Inserting a value into the $array.length index inserts the value, but also
creates an extra empty index at the end of the array.


[event]
  name="start"
  
  [set_variables]
    name="test"
    mode="append"
    
    [value]
      val=0
    [/value]
    [value]
      val=1
    [/value]
    [value]
      val=2
    [/value]
  [/set_variables]
  
  [set_variables]
    name="test[3]"
    mode="insert"
    
    [value]
      val=3
    [/value]
    
  [/set_variables]
  
[/event]


Which results in this, per the debug: https://i.imgur.com/Mm0M7HJ.png




    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?24412>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs

Reply via email to