shithub: pokered

Download patch

ref: 9dc48a1be72413c33976b7f9ecd4b0a5cb310f60
parent: 19e4e188ceee383af090a6bc49f42151bf474e00
author: dannye <corrnondacqb@yahoo.com>
date: Sat Dec 2 09:40:34 EST 2017

Replace hardcoded address offset

--- a/engine/save.asm
+++ b/engine/save.asm
@@ -619,7 +619,7 @@
 	ld a,[sMainDataCheckSum]
 	cp c
 	jr nz,.next
-	ld hl,sMainData + 98 ; player ID
+	ld hl,sMainData + (wPlayerID - wMainDataStart) ; player ID
 	ld a,[hli]
 	ld h,[hl]
 	ld l,a