diff options
| author | Hiroshi Mimaki <[email protected]> | 2014-11-25 14:11:57 +0900 |
|---|---|---|
| committer | Hiroshi Mimaki <[email protected]> | 2014-11-25 14:11:57 +0900 |
| commit | 251dbca8e25265f0f53c6413cd55a90871350a25 (patch) | |
| tree | d71a7574e7a62f3c175394c881dc9c144547430d /mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c | |
| parent | 0a8e8bd04615b376d48045f5191aa174f773ce9a (diff) | |
| parent | c9c0f9a79b27034926b2b7ad190b1e48299e6581 (diff) | |
| download | mruby-251dbca8e25265f0f53c6413cd55a90871350a25.tar.gz mruby-251dbca8e25265f0f53c6413cd55a90871350a25.zip | |
Merge pull request #2644 from cremno/mrdb-minor-changes
mrdb: minor changes
Diffstat (limited to 'mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c')
| -rwxr-xr-x | mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c b/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c index 53f5fe4ef..46201eb07 100755 --- a/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c +++ b/mrbgems/mruby-bin-debugger/tools/mrdb/apilist.c @@ -105,7 +105,8 @@ source_file_new(mrb_state *mrb, mrb_debug_context *dbg, char *filename) static mrb_bool remove_newlines(char *s, FILE *fp) { - char c, *p; + int c; + char *p; size_t len; if ((len = strlen(s)) == 0) { @@ -120,7 +121,7 @@ remove_newlines(char *s, FILE *fp) if (*p == '\r') { /* peek the next character and skip '\n' */ - if ((unsigned char)(c = fgetc(fp)) != '\n') { + if ((c = fgetc(fp)) != '\n') { ungetc(c, fp); } } |
