From 721de974eebda2337ff258f4afb413b4abdfc691 Mon Sep 17 00:00:00 2001 From: ceriel Date: Mon, 2 Mar 1987 16:43:19 +0000 Subject: [PATCH] Bug fix --- util/cpp/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/cpp/main.c b/util/cpp/main.c index bb1ea8d75..eb002c3ff 100644 --- a/util/cpp/main.c +++ b/util/cpp/main.c @@ -52,6 +52,7 @@ compile(argc, argv) break; case 0: FileName = ""; + WorkingDir = 0; break; default: fatal("use: %s [options] [source]", prog_name); @@ -61,6 +62,6 @@ compile(argc, argv) if (!InsertFile(source, (char **) 0, &dummy)) /* read the source file */ fatal("%s: no source file %s\n", prog_name, source ? source : "stdin"); - WorkingDir = getwdir(dummy); + if (source) WorkingDir = getwdir(dummy); preprocess(source); } -- 2.34.1