diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-08-09 11:02:44 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-08-09 11:02:44 +0000 |
commit | c10d6dd38c9fff3ea0ec335465b7f632d5b086db (patch) | |
tree | 6c5c6ce4e7392a8a0645dc132d7f21f325b0cb99 /src/char_sql | |
parent | 8422b98a28e183d714d721a0b201391e183fb546 (diff) | |
download | hercules-c10d6dd38c9fff3ea0ec335465b7f632d5b086db.tar.gz hercules-c10d6dd38c9fff3ea0ec335465b7f632d5b086db.tar.bz2 hercules-c10d6dd38c9fff3ea0ec335465b7f632d5b086db.tar.xz hercules-c10d6dd38c9fff3ea0ec335465b7f632d5b086db.zip |
The new functions now clear junk from the output buffer, this simplifies the code a bit.
Added a TODO for one emblem loading problem/crash.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10969 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql')
-rw-r--r-- | src/char_sql/char.c | 2 | ||||
-rw-r--r-- | src/char_sql/int_guild.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c index 1b598b662..d3081df57 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -3187,7 +3187,7 @@ int parse_char(int fd) WFIFOHEAD(fd,28); WFIFOW(fd,0) = 0x71; WFIFOL(fd,2) = char_dat.char_id; - safestrncpy((char*)WFIFOP(fd,6), mapindex_getmapname_ext(mapindex_id2name(char_dat.last_point.map),NULL), MAP_NAME_LENGTH_EXT); + mapindex_getmapname_ext(mapindex_id2name(char_dat.last_point.map), (char*)WFIFOP(fd,6)); { // Advanced subnet check [LuzZza] uint32 subnet_map_ip; diff --git a/src/char_sql/int_guild.c b/src/char_sql/int_guild.c index e516da9e6..93de44571 100644 --- a/src/char_sql/int_guild.c +++ b/src/char_sql/int_guild.c @@ -441,6 +441,7 @@ struct guild * inter_guild_fromsql(int guild_id) strncpy(g->mes2,sql_row[10],119); g->emblem_len=atoi(sql_row[11]); g->emblem_id=atoi(sql_row[12]); + //FIXME: check for sql_row[13]==NULL, just in case for(i=0,pstr=sql_row[13],pEmblemData=g->emblem_data; i < g->emblem_len; i++,pstr+=2){ int c1=pstr[0],c2=pstr[1],x1=0,x2=0; if(c1>='0' && c1<='9') |