shithub: scc

Download patch

ref: afaf65e56d7dc4da61281c8358bc88bdb773c167
parent: d125d933343eea7ca85d4c37e6f224eaf1893184
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sun Oct 1 07:58:05 EDT 2017

[as] Fix error() in nextline()

Nextline() was calling error() but the reovery point was set after
the call to nextline().

--- a/as/main.c
+++ b/as/main.c
@@ -63,12 +63,10 @@
 
 	if ((fp = fopen(fname, "r")) == NULL)
 		die("as: error opening '%s'", fname);
-
 	isections();
-	while (nextline(fp, &line)) {
-		if (setjmp(recover))
-			continue;
 
+	setjmp(recover);
+	while (nextline(fp, &line)) {
 		linesym = NULL;
 
 		if (line.label)