diff options
| author | Yukihiro Matsumoto <[email protected]> | 2012-04-28 23:39:54 +0900 |
|---|---|---|
| committer | Yukihiro Matsumoto <[email protected]> | 2012-04-28 23:39:54 +0900 |
| commit | a893a48b68029491dff643d7fb471cf79240cf2d (patch) | |
| tree | 098e33d0c682ba27b6ea30e8b5750da6ce5444ca | |
| parent | 0c5eba8936374a1206057170b72fb31e8f725bdb (diff) | |
| download | mruby-a893a48b68029491dff643d7fb471cf79240cf2d.tar.gz mruby-a893a48b68029491dff643d7fb471cf79240cf2d.zip | |
use readint/readfloat instead of sscanf
| -rw-r--r-- | src/load.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/load.c b/src/load.c index 19b630660..3b62a0e7a 100644 --- a/src/load.c +++ b/src/load.c @@ -412,12 +412,12 @@ read_rite_irep_record(mrb_state *mrb, unsigned char *src, mrb_irep *irep, uint32 switch (tt) { //pool data case MRB_TT_FIXNUM: - sscanf(buf, "%d", &fix_num); + fix_num = readint(buf, 10); irep->pool[i] = mrb_fixnum_value(fix_num); break; case MRB_TT_FLOAT: - sscanf(buf, "%le", &f); + f = readfloat(buf); irep->pool[i] = mrb_float_value(f); break; |
