diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-07-31 19:01:09 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-07-31 19:01:09 +0900 |
| commit | 9bfc64b4cb91d36d7f153c8ad78d96a064e44b37 (patch) | |
| tree | 10c861dd8911e5faaa3d8364593a6c1a6f73b66f /src | |
| parent | e064ff2098f8cf6e409b86df2d3b0da3217ff1a8 (diff) | |
| parent | 954c33a854e61078e60ce21dfdc8befda6b8e81d (diff) | |
| download | mruby-9bfc64b4cb91d36d7f153c8ad78d96a064e44b37.tar.gz mruby-9bfc64b4cb91d36d7f153c8ad78d96a064e44b37.zip | |
Merge branch 'master' of github.com:mruby/mruby
Diffstat (limited to 'src')
| -rw-r--r-- | src/array.c | 4 | ||||
| -rw-r--r-- | src/pool.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/array.c b/src/array.c index c385fe99b..804c946da 100644 --- a/src/array.c +++ b/src/array.c @@ -682,10 +682,10 @@ mrb_ary_aget(mrb_state *mrb, mrb_value self) if (mrb_type(argv[0]) != MRB_TT_FIXNUM) { mrb_raise(mrb, E_TYPE_ERROR, "expected Fixnum"); } - len = mrb_fixnum(argv[0]); if (index < 0) index += a->len; if (index < 0 || a->len < (int)index) return mrb_nil_value(); - if ((len = mrb_fixnum(argv[0])) < 0) return mrb_nil_value(); + len = mrb_fixnum(argv[0]); + if (len < 0) return mrb_nil_value(); if (a->len == (int)index) return mrb_ary_new(mrb); if ((int)len > a->len - index) len = a->len - index; return ary_subseq(mrb, a, index, len); diff --git a/src/pool.c b/src/pool.c index 36c6fa8eb..daa6d0f69 100644 --- a/src/pool.c +++ b/src/pool.c @@ -9,7 +9,7 @@ #include <string.h> /* configuration section */ -/* allcated memory address should be multiple of POOL_ALLOC_ALIGN */ +/* allocated memory address should be multiple of POOL_ALIGNMENT */ /* or undef it if alignment does not matter */ #ifndef POOL_ALIGNMENT #define POOL_ALIGNMENT 4 |
