changeset 582:8e2f9e376489

Bugfix for "tinycc - -v < hello.c"
author Rob Landley <rob@landley.net>
date Sat, 29 Mar 2008 14:18:28 -0500
parents 8595fe33590f
children 2d9e5cc32ea9
files options.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/options.c	Sat Mar 29 13:51:33 2008 -0500
+++ b/options.c	Sat Mar 29 14:18:28 2008 -0500
@@ -596,7 +596,7 @@
         if (tccg_output_type == TCC_OUTPUT_PREPROCESS) {
             tcc_add_file_internal(s, filename,
                                   AFF_PRINT_ERROR | AFF_PREPROCESS);
-        } else if (filename[0] == '-') {
+        } else if (*filename == '-' && filename[1]) {
             if (tcc_add_library(s, filename + 2) < 0)
                 error("cannot find %s", filename);
         } else if (tcc_add_file(s, filename) < 0) {