diff options
author | Mysterious <mysteriousragnarok@hotmail.com> | 2013-02-03 17:59:43 -0800 |
---|---|---|
committer | Mysterious <mysteriousragnarok@hotmail.com> | 2013-02-03 17:59:43 -0800 |
commit | 9909d3bf4f4ad0acad48fbe5f1cfe69e44109da9 (patch) | |
tree | a9b1a6855824986b8bfa47a98236d30a1f2e1d33 /src/map/npc.c | |
parent | ac7c180e10c5c84eae1ef8769942853ac8abc6f9 (diff) | |
parent | fe8d3fc42729f2afc37426e26080b2d04f65d9f3 (diff) | |
download | hercules-9909d3bf4f4ad0acad48fbe5f1cfe69e44109da9.tar.gz hercules-9909d3bf4f4ad0acad48fbe5f1cfe69e44109da9.tar.bz2 hercules-9909d3bf4f4ad0acad48fbe5f1cfe69e44109da9.tar.xz hercules-9909d3bf4f4ad0acad48fbe5f1cfe69e44109da9.zip |
Merge pull request #1 from HerculesWS/master
Merging
Diffstat (limited to 'src/map/npc.c')
-rw-r--r-- | src/map/npc.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 5d8a0274e..3aabeaf98 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #include "../common/cbasetypes.h" #include "../common/timer.h" @@ -231,6 +232,9 @@ int npc_rr_secure_timeout_timer(int tid, unsigned int tick, int id, intptr_t dat **/ if( sd->st ) sd->st->state = END; + sd->state.menu_or_input = 0; + sd->npc_menu = 0; + /** * This guy's been idle for longer than allowed, close him. **/ @@ -1915,7 +1919,7 @@ void npc_addsrcfile(const char* name) file = (struct npc_src_list*)aMalloc(sizeof(struct npc_src_list) + strlen(name)); file->next = NULL; - strncpy(file->name, name, strlen(name) + 1); + safestrncpy(file->name, name, strlen(name) + 1); if( file_prev == NULL ) npc_src_files = file; else @@ -3606,7 +3610,7 @@ void npc_read_event_script(void) DBData *data; char name[64]="::"; - strncpy(name+2,config[i].event_name,62); + safestrncpy(name+2,config[i].event_name,62); script_event[i].event_count = 0; iter = db_iterator(ev_db); |