summaryrefslogtreecommitdiff
path: root/src/map/itemdb.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-09 16:54:36 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-03-09 16:54:36 +0000
commit3d6011c46f2f556aa0b9ad41c9e6139ba687e90d (patch)
treed9e48e7cf18157e39b541d3232806c58d488642e /src/map/itemdb.c
parent52db25907d75f8d9d9eb914e794f8622c5f540b9 (diff)
downloadhercules-3d6011c46f2f556aa0b9ad41c9e6139ba687e90d.tar.gz
hercules-3d6011c46f2f556aa0b9ad41c9e6139ba687e90d.tar.bz2
hercules-3d6011c46f2f556aa0b9ad41c9e6139ba687e90d.tar.xz
hercules-3d6011c46f2f556aa0b9ad41c9e6139ba687e90d.zip
- Moved a bunch of sc_effects that should be cancelled on hit from mob_damage/pc_damage to battle_damage.
- Changed ITEM_NAME_LENGTH to 50. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5533 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/itemdb.c')
-rw-r--r--src/map/itemdb.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 0e7241ea8..814a5239e 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -238,8 +238,8 @@ static void create_dummy_data(void) {
dummy_item->nameid=500;
dummy_item->weight=1;
dummy_item->type=3; //Etc item
- strncpy(dummy_item->name,"UNKNOWN_ITEM",ITEM_NAME_LENGTH);
- strncpy(dummy_item->jname,"UNKNOWN_ITEM",ITEM_NAME_LENGTH);
+ strncpy(dummy_item->name,"UNKNOWN_ITEM",ITEM_NAME_LENGTH-1);
+ strncpy(dummy_item->jname,"UNKNOWN_ITEM",ITEM_NAME_LENGTH-1);
dummy_item->view_id = 512; //Use apple sprite.
}
@@ -575,7 +575,7 @@ static int itemdb_read_itemnametable(void)
}
#endif
- memcpy(itemdb_search(nameid)->jname,buf2,ITEM_NAME_LENGTH-1);
+ strncpy(itemdb_search(nameid)->jname,buf2,ITEM_NAME_LENGTH-1);
}
p=strchr(p,10);
@@ -848,8 +848,8 @@ static int itemdb_read_sqldb(void)
// ----------
id = itemdb_load(nameid);
- memcpy(id->name, sql_row[1], ITEM_NAME_LENGTH);
- memcpy(id->jname, sql_row[2], ITEM_NAME_LENGTH);
+ strncpy(id->name, sql_row[1], ITEM_NAME_LENGTH-1);
+ strncpy(id->jname, sql_row[2], ITEM_NAME_LENGTH-1);
id->type = atoi(sql_row[3]);
if (id->type == 11)
@@ -991,8 +991,8 @@ static int itemdb_readdb(void)
//ID,Name,Jname,Type,Price,Sell,Weight,ATK,DEF,Range,Slot,Job,Job Upper,Gender,Loc,wLV,eLV,refineable,View
id=itemdb_load(nameid);
- memcpy(id->name, str[1], ITEM_NAME_LENGTH);
- memcpy(id->jname, str[2], ITEM_NAME_LENGTH);
+ strncpy(id->name, str[1], ITEM_NAME_LENGTH-1);
+ strncpy(id->jname, str[2], ITEM_NAME_LENGTH-1);
id->type=atoi(str[3]);
if (id->type == 11)
{ //Items that are consumed upon target confirmation