1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2007-08-18 06:45:37 +00:00
parent 88e1fec393
commit d23abfc546
2 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Sat Aug 18 15:45:34 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* insnhelper.ci (vm_yield_setup_args): rsize and psize should not be
negative.
Sat Aug 18 14:35:00 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* insnhelper.ci (vm_callee_setup_arg, vm_send_optimize,

View file

@ -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]);