Ancurio / mkxp

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

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

Open cremno opened 4 years ago

cremno commented 4 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.