Ancurio / mkxp

Free Software implementation of the Ruby Game Scripting System (RGSS)
GNU General Public License v2.0
509 stars 128 forks source link

incorrect serialization of multi-dimensional tables if {y,z}size <= 1 #232

Open cremno opened 3 years ago

cremno commented 3 years ago
Table.new(1, 1, 1)._dump(-1).unpack(?V)[0]  # => 1
Table.new(1, 0, 1)._dump(-1).unpack(?V)[0]  # => 1
Table.new(0, 1)._dump(-1).unpack(?V)[0]  # => 1
Table.new(0, 0)._dump(-1).unpack(?V)[0]  # => 1

Should be 3, 3, 2, 2.