diff options
| author | Yukihiro Matz Matsumoto <[email protected]> | 2013-01-16 08:00:47 +0900 |
|---|---|---|
| committer | Yukihiro Matz Matsumoto <[email protected]> | 2013-01-16 08:00:47 +0900 |
| commit | 98d364e4a692b942d71cb976c034ccaaa6479afc (patch) | |
| tree | 295803f3911a78e8a53373b6a3b8f9b7c57adfd8 /src/dump.c | |
| parent | 81e55d98057a4abab1716d1c401a538d0715c7a4 (diff) | |
| parent | d1656d4371e06259191045409701208ee00bdeb6 (diff) | |
| download | mruby-98d364e4a692b942d71cb976c034ccaaa6479afc.tar.gz mruby-98d364e4a692b942d71cb976c034ccaaa6479afc.zip | |
Merge branch 'master' of github.com:mruby/mruby
Diffstat (limited to 'src/dump.c')
| -rw-r--r-- | src/dump.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/dump.c b/src/dump.c index 2885c225a..884a9141f 100644 --- a/src/dump.c +++ b/src/dump.c @@ -507,6 +507,7 @@ calc_crc_section(mrb_state *mrb, mrb_irep *irep, uint16_t *crc, int section) result = write_syms_block(mrb, irep, buf, type); break; default: + result = MRB_DUMP_GENERAL_FAILURE; break; /* Already checked above. */ } if (result < 0) { @@ -689,7 +690,7 @@ mrb_write_irep(mrb_state *mrb, int top, char *bin) for (irep_no=top; irep_no<mrb->irep_len; irep_no++) { rc = write_irep_record(mrb, irep_no, bin, &rlen, DUMP_TYPE_BIN); - if (rc != 0) + if (rc != MRB_DUMP_OK) return rc; bin += (rlen + DUMP_SIZE(MRB_DUMP_SIZE_OF_LONG, DUMP_TYPE_BIN)); @@ -718,7 +719,7 @@ mrb_dump_irep(mrb_state *mrb, int top, FILE* fp) for (irep_no=top; irep_no<mrb->irep_len; irep_no++) { rc = dump_irep_record(mrb, irep_no, fp, &rlen); - if (rc != 0) + if (rc != MRB_DUMP_OK) return rc; rbds += rlen; |
