summaryrefslogtreecommitdiff
path: root/insnhelper.ci
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-18 06:45:37 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-18 06:45:37 +0000
commitd23abfc546cf0b5f1b28588036af691938c484a0 (patch)
treee8d43102820b867573732c998d97da6534e7a17d /insnhelper.ci
parent88e1fec39389ab4ea4952db397e7ad1d1bab4a65 (diff)
* insnhelper.ci (vm_yield_setup_args): rsize and psize should not be
negative. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13099 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'insnhelper.ci')
-rw-r--r--insnhelper.ci3
1 files changed, 1 insertions, 2 deletions
diff --git a/insnhelper.ci b/insnhelper.ci
index ff42a7c2fa..369aeef251 100644
--- a/insnhelper.ci
+++ b/insnhelper.ci
@@ -715,11 +715,10 @@ vm_yield_setup_args(rb_thread_t *th, rb_iseq_t *iseq,
if (iseq->arg_post_len) {
int len = iseq->arg_post_len;
int start = iseq->arg_post_start;
- int rsize = argc - m;
+ int rsize = argc > m ? argc - m : 0;
int psize = rsize;
VALUE ary;
- if (rsize < 0) rsize = 0;
if (psize > len) psize = len;
ary = rb_ary_new4(rsize - psize, &argv[r]);