diff --git a/libtcc.c b/libtcc.c index 5d06652b..01abdbc4 100644 --- a/libtcc.c +++ b/libtcc.c @@ -1039,6 +1039,11 @@ ST_FUNC int tcc_add_file_internal(TCCState *s1, const char *filename, int flags) filename = buf; #endif + /* ignore binary files with -E */ + if (s1->output_type == TCC_OUTPUT_PREPROCESS + && (flags & AFF_TYPE_BIN)) + return 0; + /* open the file */ fd = _tcc_open(s1, filename); if (fd < 0) { diff --git a/tccpp.c b/tccpp.c index 8100f887..92a747b8 100644 --- a/tccpp.c +++ b/tccpp.c @@ -3236,6 +3236,7 @@ static int next_argstream(Sym **nested_list, TokenString *ws_str) } else if (c == '/') { p = parse_line_comment(p) - 1; } else { + *--p = ch; break; } ch = ' ';