diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-24 12:14:18 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-24 12:14:18 +0000 |
commit | 3ecde465534c93315a1f88430129e8400f4d9fe2 (patch) | |
tree | fb1153e7be48da7d89b9697be733124650045fdf /src/char_sql/char.c | |
parent | 04580084c4ac2113d06a23fdf2ca4596dd04011b (diff) | |
download | hercules-3ecde465534c93315a1f88430129e8400f4d9fe2.tar.gz hercules-3ecde465534c93315a1f88430129e8400f4d9fe2.tar.bz2 hercules-3ecde465534c93315a1f88430129e8400f4d9fe2.tar.xz hercules-3ecde465534c93315a1f88430129e8400f4d9fe2.zip |
* Cleaned up some messy guild code (more to come)
* Cleaned up the mail code, no more pointless dynamic allocation
* Added upgrade_svn11548.sql to convert the mail table to new format
* Updated vs7 and vs6 project files
* Increased the max. send buffer size to 5M since 1M is not enough
* Please complain if something stops working ^^;
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11571 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/char.c')
-rw-r--r-- | src/char_sql/char.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c index 649d4c368..5d5f04653 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -3205,13 +3205,13 @@ int mapif_send(int fd, unsigned char *buf, unsigned int len) int i; if (fd >= 0) { - for(i = 0; i < MAX_MAP_SERVERS; i++) { - if (fd == server_fd[i]) { - WFIFOHEAD(fd,len); - memcpy(WFIFOP(fd,0), buf, len); - WFIFOSET(fd,len); - return 1; - } + ARR_FIND( 0, MAX_MAP_SERVERS, i, fd == server_fd[i] ); + if( i < MAX_MAP_SERVERS ) + { + WFIFOHEAD(fd,len); + memcpy(WFIFOP(fd,0), buf, len); + WFIFOSET(fd,len); + return 1; } } return 0; |