summaryrefslogtreecommitdiffstats
path: root/src/file.c
diff options
context:
space:
mode:
authorandmarti1424 <andmarti@gmail.com>2017-05-11 20:46:00 -0300
committerandmarti1424 <andmarti@gmail.com>2017-05-11 20:46:00 -0300
commit43abb1b0542a9890d2a0efe41a867dfaf35d2456 (patch)
tree4887eab976e2eb89386d32ee7098b94ca4cc2f02 /src/file.c
parent7db4b5124f271d7a0b122c101476c7bcdac94934 (diff)
readfile: set curfile even if sc file tried to read does not exists
Diffstat (limited to 'src/file.c')
-rwxr-xr-xsrc/file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/file.c b/src/file.c
index fac0f5c..2eeb434 100755
--- a/src/file.c
+++ b/src/file.c
@@ -571,7 +571,7 @@ int readfile(char * fname, int eraseflg) {
}
// We open an 'sc' format file
- // open fname for reading ?
+ // open fname for reading
register FILE * f;
char save[PATHLEN];
if (*fname == '\0') fname = curfile;
@@ -579,6 +579,7 @@ int readfile(char * fname, int eraseflg) {
f = fopen(save, "r");
if (f == NULL) {
loading = 0;
+ strcpy(curfile, save);
return 0;
} /* */