summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-30 19:22:14 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-30 19:22:14 +0000
commitde96c0071f2e9a2c0a97dca96a34620b9ca0473b (patch)
treec0bacc3619365871733c833e28b4fb60959ea78c
parent552a4f2ca3c8691a65b254e65c6512e6eb6ddaef (diff)
downloadhercules-de96c0071f2e9a2c0a97dca96a34620b9ca0473b.tar.gz
hercules-de96c0071f2e9a2c0a97dca96a34620b9ca0473b.tar.bz2
hercules-de96c0071f2e9a2c0a97dca96a34620b9ca0473b.tar.xz
hercules-de96c0071f2e9a2c0a97dca96a34620b9ca0473b.zip
* [Fixed]:
- signed/usigned problem in sprintf and fscanf @ mercenary.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6858 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/mercenary.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 7ffc525bb..7b01686ab 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/05/30
+ * [Fixed]:
+ - signed/usigned problem in sprintf and fscanf @ mercenary.c [Lance]
* Rewrote/cleaned up @petfriendly. [Skotlex]
* Cleaned up final part of status_calc_pc (flags 2/4 do not exist) [Skotlex]
* Updated attr_fix_table reading code to account for ELE_MAX (will
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index 335bd54fa..0ceb9cbf5 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -84,7 +84,7 @@ void merc_load_exptables(void)
for(i=0;i<125;++i)
{
- fscanf(fl,"%u,",&(hexptbl[i]));
+ fscanf(fl,"%lu,",&(hexptbl[i]));
}
fclose(fl);
}
@@ -153,7 +153,7 @@ void merc_heal(struct homun_data *hd,int hp,int sp)
#ifndef TXT_ONLY
void merc_save(struct homun_data *hd)
{
- sprintf(tmp_sql, "UPDATE `homunculus` SET `class`='%d',`name`='%s',`level`='%d',`exp`='%d',`hunger`='%d',`hp`='%d',`sp`='%d',`skill1lv`='%d',`skill2lv`='%d',`skill3lv`='%d',`skill4lv`='%d',`skillpts`='%d' WHERE `id` = '%d'",
+ sprintf(tmp_sql, "UPDATE `homunculus` SET `class`='%d',`name`='%s',`level`='%d',`exp`='%d',`hunger`='%d',`hp`='%u',`sp`='%u',`skill1lv`='%d',`skill2lv`='%d',`skill3lv`='%d',`skill4lv`='%d',`skillpts`='%d' WHERE `id` = '%d'",
hd->class_,hd->name,hd->level,hd->exp,hd->hunger_rate,
hd->battle_status.hp,hd->battle_status.sp,
hd->hskill[0].level,hd->hskill[1].level,hd->hskill[2].level,hd->hskill[3].level,