summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index acdf2e62c..fe2783272 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5090,7 +5090,10 @@ int pc_resetstate(struct map_session_data* sd)
add += sumsp(sd->status.int_);
add += sumsp(sd->status.dex);
add += sumsp(sd->status.luk);
- sd->status.status_point+=add;
+ if (add > SHRT_MAX - sd->status.status_point)
+ sd->status.status_point = SHRT_MAX;
+ else
+ sd->status.status_point+=add;
}
sd->status.str=1;