summaryrefslogtreecommitdiff
path: root/src/char_sql/int_pet.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-05-23 21:23:36 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-05-23 21:23:36 +0000
commitf6bcd12cd633717e9e503bb453c85955e29cd519 (patch)
tree49225d619843accadf26532263f615392da5b8a2 /src/char_sql/int_pet.c
parent9b9305b6b1a1a004c2ef909404daa705e956a5de (diff)
downloadhercules-f6bcd12cd633717e9e503bb453c85955e29cd519.tar.gz
hercules-f6bcd12cd633717e9e503bb453c85955e29cd519.tar.bz2
hercules-f6bcd12cd633717e9e503bb453c85955e29cd519.tar.xz
hercules-f6bcd12cd633717e9e503bb453c85955e29cd519.zip
- Added new flag to skill_castnodex.txt, to allow per-skill tweaking of cast time and delay reducibility by item scripts (cards and such)
- Fixed Martyr's Reckoning never triggering for gms with all skills - Added MO_TRIPLEATTACK and RG_SNATCHER to @skillall's skill filter - Made gm_skill_unconditional bypass skill blocking (guild timer, etc) - Reverted the weird delay_dependon_agi thing (r8923, r9055, r9059) - Changed a few memsets to strncpy (reading past buffer is a bad idea) - Sped up some memset operations (multiples of 4 are faster) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10613 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/int_pet.c')
-rw-r--r--src/char_sql/int_pet.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/char_sql/int_pet.c b/src/char_sql/int_pet.c
index 3f6406be5..6352412ce 100644
--- a/src/char_sql/int_pet.c
+++ b/src/char_sql/int_pet.c
@@ -1,9 +1,6 @@
// Copyright (c) Athena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder
-// original code from athena
-// SQL conversion by Jioh L. Jung
-
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -81,7 +78,7 @@ int inter_pet_fromsql(int pet_id, struct s_pet *p){
p->pet_id = pet_id;
p->class_ = atoi(sql_row[1]);
- memcpy(p->name, sql_row[2],NAME_LENGTH-1);
+ strncpy(p->name, sql_row[2], NAME_LENGTH);
p->account_id = atoi(sql_row[3]);
p->char_id = atoi(sql_row[4]);
p->level = atoi(sql_row[5]);
@@ -192,10 +189,10 @@ int mapif_delete_pet_ack(int fd, int flag){
}
int mapif_create_pet(int fd, int account_id, int char_id, short pet_class, short pet_lv, short pet_egg_id,
- short pet_equip, short intimate, short hungry, char rename_flag, char incuvate, char *pet_name){
-
+ short pet_equip, short intimate, short hungry, char rename_flag, char incuvate, char *pet_name)
+{
memset(pet_pt, 0, sizeof(struct s_pet));
- memcpy(pet_pt->name, pet_name, NAME_LENGTH-1);
+ strncpy(pet_pt->name, pet_name, NAME_LENGTH);
if(incuvate == 1)
pet_pt->account_id = pet_pt->char_id = 0;
else {