mirror of
https://github.com/gbdev/rgbds.git
synced 2026-10-04 11:15:39 +00:00
Simplify out_PCRelByte by using PC
This commit is contained in:
1 parent
5a0fcda4c8
commit
af22cf182b
1 file changed
+1
-1
+1
-1
@@ -405,7 +405,7 @@ void out_PCRelByte(struct Expression *expr)
|
||||
nPC++;
|
||||
} else {
|
||||
/* Target is relative to the byte *after* the operand */
|
||||
uint16_t address = pCurrentSection->nOrg + nPC + 1;
|
||||
uint16_t address = sym_GetValue(pPCSymbol) + 1;
|
||||
/* The offset wraps (jump from ROM to HRAM, for loopexample) */
|
||||
int16_t offset = expr->nVal - address;
|
||||
|
||||
|
||||
Reference in new issue
Block a user