Skip to content

Commit 0cd9032

Browse files
committed
fix(2019/day/9): TS2870
> [ERROR]: This binary expression is never nullish. Are you missing parentheses?
1 parent 61b13b2 commit 0cd9032

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

2019/day/9/part/1/solve.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ function program(memory: number[]) {
3232
position = instructionPointer++;
3333
break;
3434
case 2:
35-
position = relativeBase + memory[instructionPointer++] ?? 0;
35+
position = relativeBase + (memory[instructionPointer++] ?? 0);
3636
break;
3737
default:
3838
throw new Error("unreachable");

0 commit comments

Comments
 (0)