Skip to content

Adjust some nullpo checks#3378

Open
MrKeiKun wants to merge 1 commit into
HerculesWS:masterfrom
MrKeiKun:fix-2973-nullpo-checks
Open

Adjust some nullpo checks#3378
MrKeiKun wants to merge 1 commit into
HerculesWS:masterfrom
MrKeiKun:fix-2973-nullpo-checks

Conversation

@MrKeiKun

@MrKeiKun MrKeiKun commented Aug 30, 2025

Copy link
Copy Markdown
Contributor

Pull Request Prelude

Changes Proposed

Issues addressed:
#2973
#2847 (probably?)

@MrKeiKun MrKeiKun changed the title Adjust some nullpo check on status_calc_regen_pc and status_calc_regen_rate_pc Adjust some nullpo checks Aug 30, 2025
@MrKeiKun MrKeiKun force-pushed the fix-2973-nullpo-checks branch from 49350d4 to f4dbee7 Compare August 31, 2025 15:40
Comment thread src/map/status.c Outdated
Comment thread src/map/status.c Outdated
@hemagx hemagx added this to the Release v2026.05 milestone May 24, 2026
In pc_authok, pc_setpos is called to warp the player to their last saved
position before status_calc_pc(SCO_FIRST) runs in pc_reg_received. Since
pc_setpos triggers status_calc_regen, and SCO_FIRST is the only place that
initializes sd->regen.skill and sd->regen.sitting, those pointers were NULL
on the first regen calculation, causing a nullpo crash. Initializing both
pointers in pc_authok before the pc_setpos call fixes the root cause.

Signed-off-by: Lorenzo Buitizon <the.keikun@gmail.com>
@MrKeiKun MrKeiKun force-pushed the fix-2973-nullpo-checks branch from f4dbee7 to 314f104 Compare June 7, 2026 06:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants