diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-11-19 01:48:59 -0800 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-11-19 01:48:59 -0800 |
| commit | 8a7cb26e6a9ab78b1c649e9724df583f99894f19 (patch) | |
| tree | 4d723e09463a93e2e7c88ec0f62e771d9c5f2baf /src | |
| parent | f9b14f49e6415ff9dcb0d5dee11c93f6fec5ec5c (diff) | |
| parent | d073129d9dc689343ae4564c61b5782d24af088b (diff) | |
| download | mruby-8a7cb26e6a9ab78b1c649e9724df583f99894f19.tar.gz mruby-8a7cb26e6a9ab78b1c649e9724df583f99894f19.zip | |
Merge pull request #1587 from perlun/patch-1
Fixed so that it builds with VS2013. VLA:s are not supported, because of its strict C89 world view.
Diffstat (limited to 'src')
| -rw-r--r-- | src/load.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/load.c b/src/load.c index 7d131f7b6..e5e17f352 100644 --- a/src/load.c +++ b/src/load.c @@ -505,8 +505,8 @@ mrb_load_irep(mrb_state *mrb, const uint8_t *bin) static int read_lineno_record_file(mrb_state *mrb, FILE *fp, mrb_irep *irep) { - const size_t record_header_size = 4; - uint8_t header[record_header_size]; + uint8_t header[4]; + const size_t record_header_size = sizeof(header); int result; size_t i, buf_size; uint32_t len; @@ -555,8 +555,8 @@ read_section_lineno_file(mrb_state *mrb, FILE *fp, mrb_irep *irep) static mrb_irep* read_irep_record_file(mrb_state *mrb, FILE *fp) { - const size_t record_header_size = 1 + 4; - uint8_t header[record_header_size]; + uint8_t header[1 + 4]; + const size_t record_header_size = sizeof(header); size_t buf_size, i; uint32_t len; mrb_irep *irep = NULL; |
