summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/parseSpec.c2
-rw-r--r--build/spec.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/build/parseSpec.c b/build/parseSpec.c
index 8c5838672..6eb55b4bf 100644
--- a/build/parseSpec.c
+++ b/build/parseSpec.c
@@ -106,7 +106,7 @@ static int copyNextLine(Spec spec, OFI_t *ofi, int strip)
char ch;
/* Restore 1st char in (possible) next line */
- if (spec->nextpeekc) {
+ if (spec->nextline != NULL && spec->nextpeekc != '\0') {
*spec->nextline = spec->nextpeekc;
spec->nextpeekc = '\0';
}
diff --git a/build/spec.c b/build/spec.c
index fa77546ea..ada50c24a 100644
--- a/build/spec.c
+++ b/build/spec.c
@@ -407,6 +407,7 @@ Spec newSpec(void)
spec->lbuf[0] = '\0';
spec->line = spec->lbuf;
spec->nextline = NULL;
+ spec->nextpeekc = '\0';
spec->lineNum = 0;
spec->readStack = malloc(sizeof(struct ReadLevelEntry));
spec->readStack->next = NULL;