diff options
| author | jj | 2012-09-05 20:39:13 +0200 |
|---|---|---|
| committer | jj | 2012-09-05 20:39:13 +0200 |
| commit | e09b98216fdbc8f2d059d2894fe0f5082d9c0784 (patch) | |
| tree | f32801421872970487e620b5bbf48e7ae1099e7e /plugins/ruby | |
| parent | afbace8af67d4a2a7b901728da8f9116f93d26d0 (diff) | |
| download | dfhack-e09b98216fdbc8f2d059d2894fe0f5082d9c0784.tar.gz dfhack-e09b98216fdbc8f2d059d2894fe0f5082d9c0784.tar.bz2 dfhack-e09b98216fdbc8f2d059d2894fe0f5082d9c0784.tar.xz | |
ruby: fix vector[length+50] = 0 segfault
Diffstat (limited to 'plugins/ruby')
| -rw-r--r-- | plugins/ruby/ruby-autogen-defs.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/ruby/ruby-autogen-defs.rb b/plugins/ruby/ruby-autogen-defs.rb index 9312bb69..04235284 100644 --- a/plugins/ruby/ruby-autogen-defs.rb +++ b/plugins/ruby/ruby-autogen-defs.rb @@ -476,7 +476,7 @@ module DFHack def []=(idx, v) idx += length if idx < 0 if idx >= length - insert_at(idx, 0) + insert_at(length, 0) while idx >= length elsif idx < 0 raise 'index out of bounds' end |
