commit e082102024dc1b108b686cc7b0a5dcd4d4da3185
parent 76e99b74c0360b4b3c379339d64b0e873ad675ff
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Fri, 15 Mar 2024 20:20:58 +0100
as: Fix error checking calling setsec()
It returns NULL in case of error.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cmd/as/symbol.c b/src/cmd/as/symbol.c
@@ -304,7 +304,7 @@ newsec(Symbol *sym)
exit(EXIT_FAILURE);
}
- if (setsec(obj, &sec->index, sec) < 0) {
+ if (!setsec(obj, &sec->index, sec)) {
fprintf(stderr,
"as: error adding section '%s' to output\n",
sym->name);