diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-03-05 23:55:06 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-03-05 23:55:06 -0800 |
commit | df3566afa1a0b329ffa22773e79f1c67281e44c4 (patch) | |
tree | 10d8bbd93a05f2f53cb6c87f6874ff83026f819e /txr.c | |
parent | 70f84f0b4d463049ee3be0e37c254d5a7cf931ac (diff) | |
download | txr-df3566afa1a0b329ffa22773e79f1c67281e44c4.tar.gz txr-df3566afa1a0b329ffa22773e79f1c67281e44c4.tar.bz2 txr-df3566afa1a0b329ffa22773e79f1c67281e44c4.zip |
* txr.c (txr_main): Don't push back arg into arg_list if arg is nil.
Diffstat (limited to 'txr.c')
-rw-r--r-- | txr.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -382,7 +382,8 @@ int txr_main(int argc, char **argv) chr_str(specstring, minus(length_str(specstring), one)) != chr('\n')) specstring = cat_str(list(specstring, string(L"\n"), nao), nil); yyin_stream = make_string_byte_input_stream(specstring); - push(arg, &arg_list); + if (arg) + push(arg, &arg_list); } else if (spec_file) { if (wcscmp(c_str(spec_file), L"-") != 0) { FILE *in = w_fopen(c_str(spec_file), L"r"); @@ -393,7 +394,8 @@ int txr_main(int argc, char **argv) } else { spec_file_str = lit("stdin"); } - push(arg, &arg_list); + if (arg) + push(arg, &arg_list); } else { if (!arg) { if (evaled) |