From 97ef7dfb68da9a3abccb78add4666c648c668884 Mon Sep 17 00:00:00 2001 From: skotlex Date: Thu, 9 Feb 2006 16:18:33 +0000 Subject: - pc_readdb will now cap experience required per level to UINT_MAX, it will warn the exp table has exp values above said limit. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5238 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 2 ++ src/map/pc.c | 14 +++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 126b69236..cf377d528 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -6,6 +6,8 @@ GOES INTO TRUNK AND WILL BE MERGED INTO STABLE BY VALARIS AND WIZPUTER. -- VALAR 2006/02/09 + * pc_readdb will now cap experience required per level to UINT_MAX, it will + warn if the exp table has exp values above said limit. [Skotlex] * Changed the default of skill_delay_attack_enable to no. [Skotlex] * Code rewrites in mob_damage and party_exp_even_share for correctly handling overflow issues. Now uses UINT_MAX for range comparisons, as it diff --git a/src/map/pc.c b/src/map/pc.c index 46fe462d8..66a14f9db 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -8047,10 +8047,22 @@ int pc_split_atoi(char *str,int *val, char sep, int max) int pc_split_atoui(char *str,unsigned int *val, char sep, int max) { + static int warning=0; int i,j; + float f; for (i=0; i UINT_MAX) { + val[i] = UINT_MAX; + if (!warning) { + warning = 1; + ShowWarning("pc_readdb (exp.txt): Required exp per level is capped to %d\n", UINT_MAX); + } + } else + val[i] = (unsigned int)f; str = strchr(str,sep); if (str) *str++=0; -- cgit v1.2.3-70-g09d2