aboutsummaryrefslogtreecommitdiff
path: root/src/targets/unbblc.c
diff options
context:
space:
mode:
authorMarvin Borner2024-01-18 04:10:49 +0100
committerMarvin Borner2024-01-18 04:10:49 +0100
commit1e38326879b739d1678f025341836f736c8d1d46 (patch)
treeda0c2cf52735a35e229289da368f41b266bfb0fa /src/targets/unbblc.c
parent8c54dea18abacaa381f3f38c8c226dcd01757016 (diff)
Shared BLC working except aoc
Diffstat (limited to 'src/targets/unbblc.c')
-rw-r--r--src/targets/unbblc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/targets/unbblc.c b/src/targets/unbblc.c
index 57bc1cf..4c3a3c9 100644
--- a/src/targets/unbblc.c
+++ b/src/targets/unbblc.c
@@ -47,9 +47,8 @@ static void fprint_unbblc(struct term *term, struct bloc_parsed *bloc,
case REF:
if (term->u.ref.index + 1 >= bloc->length)
fatal("invalid ref index %ld\n", term->u.ref.index);
- fprint_unbblc(
- bloc->entries[bloc->length - term->u.ref.index - 2],
- bloc, file, byte, bit);
+ fprint_unbblc(bloc->entries[term->u.ref.index], bloc, file,
+ byte, bit);
break;
default:
fatal("invalid type %d\n", term->type);