Fixed some memory corruptions [MouseJstr]
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1370 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
566d2d53ac
commit
107001247d
@ -2,6 +2,13 @@
|
|||||||
Date Added
|
Date Added
|
||||||
|
|
||||||
03/31
|
03/31
|
||||||
|
* Fixed memory corruption during shutdown via the script_buf
|
||||||
|
[SVN 1370: MouseJstr]
|
||||||
|
* Added some useful filename info to the script parser so that
|
||||||
|
it is easier to figure out what is going on [SVN 1370:
|
||||||
|
MouseJstr]
|
||||||
|
* updated the visual studio projects a little bit [SVN 1370:
|
||||||
|
MouseJstr]
|
||||||
* fixed memory corruption in mapif_guild_info:int_guild.c
|
* fixed memory corruption in mapif_guild_info:int_guild.c
|
||||||
[SVN 1367: MouseJstr]
|
[SVN 1367: MouseJstr]
|
||||||
* Fixed common/lock.c (problem with unistd.h include) [Codemaster]
|
* Fixed common/lock.c (problem with unistd.h include) [Codemaster]
|
||||||
|
@ -29,7 +29,10 @@
|
|||||||
#include "memwatch.h"
|
#include "memwatch.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
#undef isspace
|
||||||
|
#define isspace(x) (x == ' ' || x == '\t')
|
||||||
|
#endif
|
||||||
|
|
||||||
struct npc_src_list {
|
struct npc_src_list {
|
||||||
struct npc_src_list * next;
|
struct npc_src_list * next;
|
||||||
@ -1708,11 +1711,11 @@ static int npc_parse_script(char *w1,char *w2,char *w3,char *w4,char *first_line
|
|||||||
char srcname[128];
|
char srcname[128];
|
||||||
struct npc_data *nd2;
|
struct npc_data *nd2;
|
||||||
if( sscanf(w2,"duplicate(%[^)])",srcname)!=1 ){
|
if( sscanf(w2,"duplicate(%[^)])",srcname)!=1 ){
|
||||||
printf("bad duplicate name! : %s",w2);
|
printf("bad duplicate name (in %s)! : %s",current_file, w2);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if( (nd2=npc_name2id(srcname))==NULL ){
|
if( (nd2=npc_name2id(srcname))==NULL ){
|
||||||
printf("bad duplicate name! (not exist) : %s\n",srcname);
|
printf("bad duplicate name (in %s)! (not exist) : %s\n", current_file, srcname);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
script=(unsigned char *)nd2->u.scr.script;
|
script=(unsigned char *)nd2->u.scr.script;
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
(t)=conv_num(st,&(st->stack->stack_data[st->start+(n)]));
|
(t)=conv_num(st,&(st->stack->stack_data[st->start+(n)]));
|
||||||
|
|
||||||
enum { LABEL_NEXTLINE=1,LABEL_START };
|
enum { LABEL_NEXTLINE=1,LABEL_START };
|
||||||
static unsigned char * script_buf;
|
static unsigned char * script_buf = NULL;
|
||||||
static int script_pos,script_size;
|
static int script_pos,script_size;
|
||||||
|
|
||||||
char *str_buf;
|
char *str_buf;
|
||||||
@ -65,7 +65,7 @@ static struct str_data_struct {
|
|||||||
int (*func)(struct script_state *);
|
int (*func)(struct script_state *);
|
||||||
int val;
|
int val;
|
||||||
int next;
|
int next;
|
||||||
} *str_data;
|
} *str_data = NULL;
|
||||||
int str_num=LABEL_START,str_data_size;
|
int str_num=LABEL_START,str_data_size;
|
||||||
int str_hash[16];
|
int str_hash[16];
|
||||||
|
|
||||||
@ -7813,8 +7813,8 @@ int do_final_script()
|
|||||||
{
|
{
|
||||||
if(mapreg_dirty>=0)
|
if(mapreg_dirty>=0)
|
||||||
script_save_mapreg();
|
script_save_mapreg();
|
||||||
if(script_buf)
|
// if(script_buf)
|
||||||
aFree(script_buf);
|
// aFree(script_buf);
|
||||||
|
|
||||||
if(mapreg_db)
|
if(mapreg_db)
|
||||||
numdb_final(mapreg_db,mapreg_db_final);
|
numdb_final(mapreg_db,mapreg_db_final);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user