From ca7575363e8517c0d409eed2641ed2ba6a523141 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Sat, 22 Jun 2024 16:15:07 -0400 Subject: protbas: fix WTFery in fixcode(). --- unprotbas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unprotbas.c b/unprotbas.c index 3c53492..ae01b50 100644 --- a/unprotbas.c +++ b/unprotbas.c @@ -97,7 +97,7 @@ int fixcode(void) { /* fprintf(stderr, "pos %d, line #%d, offset %d\n", pos, lineno, offset); */ if(offset < 6) { if(verbose) fprintf(stderr, "Found invalid offset %d (<6) at line %d, file offset $%04x.\n", offset, lineno, pos); - offset += fixline(pos); + offset = fixline(pos); result++; } pos += offset; -- cgit v1.2.3