summaryrefslogtreecommitdiff
path: root/src/char_sql/char.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/char_sql/char.c')
-rw-r--r--src/char_sql/char.c14
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;