Jump to content
Eternal Lands Official Forums
Light Lan

person blue on minimap though it is not on my buddylist

Recommended Posts

today I came by a new bot with the name BernieMadoff and wondered why it is blue on minimap(buddy color)

 

 

the only reason I think where it could come from is, I have Bernie on my buddylist, so there happens some incorrect check. (only start of name matches)

Share this post


Link to post
Share on other sites

If Bernie isn't online the server matches it with the next simmilar name(BernieMadoff), like when you send a pm to an incomplete name like: /lightl hi -->the server does: /lightlan hi

Share this post


Link to post
Share on other sites

New bug, old issue was around case-insensitive this one is about string length.

 

is_in_buddylist() (buddylist.c)

 

Currently is: (changed to strncasecmp, from strncmp)

if(buddy_list[i].type < 0xff && strncasecmp(buddy_list[i].name, name, strlen(buddy_list[i].name)) == 0)

 

But the strncasecmp in this case will check up to "length of buddy_list.name" So:

Bernie

BernieMadoff

Will return equal because only the length of "Bernie" was compared.

 

So:

if(buddy_list.type < 0xff && strncasecmp(buddy_list.name, name, strlen(buddy_list.name)) == 0)

To:

if(buddy_list.type < 0xff && strcasecmp(buddy_list.name, name) == 0)

Share this post


Link to post
Share on other sites
New bug, old issue was around case-insensitive this one is about string length.

is_in_buddylist() (buddylist.c)

Yup, that was it. Fixed in CVS now. Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×