Prevented @stpoint and @skpoint from causing overflows.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/renewal@14428 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
4a5136364d
commit
2e7d224a8e
@ -1,5 +1,7 @@
|
|||||||
Date Added
|
Date Added
|
||||||
|
|
||||||
|
2010/10/13
|
||||||
|
* Prevented @stpoint and @skpoint from causing overflows. [Paradox924X]
|
||||||
2010/10/11
|
2010/10/11
|
||||||
* Implemented official cash food behavior, including use delay, not being dispelled (including on death),
|
* Implemented official cash food behavior, including use delay, not being dispelled (including on death),
|
||||||
distinct status effects and icons from the ordinary food types. (bugreport:2560) [Paradox924X]
|
distinct status effects and icons from the ordinary food types. (bugreport:2560) [Paradox924X]
|
||||||
|
@ -2857,7 +2857,7 @@ int atcommand_statuspoint(const int fd, struct map_session_data* sd, const char*
|
|||||||
if (point < 0 && sd->status.status_point < -point)
|
if (point < 0 && sd->status.status_point < -point)
|
||||||
new_status_point = 0;
|
new_status_point = 0;
|
||||||
else
|
else
|
||||||
new_status_point = sd->status.status_point + point;
|
new_status_point = cap_value(sd->status.status_point + point, 0, INT_MAX);
|
||||||
|
|
||||||
if (new_status_point != (int)sd->status.status_point) {
|
if (new_status_point != (int)sd->status.status_point) {
|
||||||
sd->status.status_point = new_status_point;
|
sd->status.status_point = new_status_point;
|
||||||
@ -2890,7 +2890,7 @@ int atcommand_skillpoint(const int fd, struct map_session_data* sd, const char*
|
|||||||
if (point < 0 && sd->status.skill_point < -point)
|
if (point < 0 && sd->status.skill_point < -point)
|
||||||
new_skill_point = 0;
|
new_skill_point = 0;
|
||||||
else
|
else
|
||||||
new_skill_point = sd->status.skill_point + point;
|
new_skill_point = cap_value(sd->status.skill_point + point, 0, INT_MAX);
|
||||||
|
|
||||||
if (new_skill_point != (int)sd->status.skill_point) {
|
if (new_skill_point != (int)sd->status.skill_point) {
|
||||||
sd->status.skill_point = new_skill_point;
|
sd->status.skill_point = new_skill_point;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user