Commit d5e175e3 authored by Kevin Puetz's avatar Kevin Puetz Committed by Alexandre Julliard

winegcc: Correctly pass the '-' file name (stdin) to the compiler.

parent 4e896e3e
......@@ -795,7 +795,7 @@ no_compat_defines:
/* last, but not least, the files */
for ( j = 0; j < opts->files->size; j++ )
{
if (opts->files->base[j][0] != '-')
if (opts->files->base[j][0] != '-' || !opts->files->base[j][1]) /* not an option or bare '-' (i.e. stdin) */
strarray_add(comp_args, opts->files->base[j]);
}
......@@ -1472,7 +1472,7 @@ int main(int argc, char **argv)
/* parse options */
for ( i = 1 ; i < argc ; i++ )
{
if (argv[i][0] == '-') /* option */
if (argv[i][0] == '-' && argv[i][1]) /* option, except '-' alone is stdin, which is a file */
{
/* determine if this switch is followed by a separate argument */
next_is_arg = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment