Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
tintin++ ogg sound player script for linux
Author: Robert Smith
Submitted by: Vladaar
6Dragons ogg Soundpack
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.4
Author: Vladaar
Submitted by: Vladaar
LoP 1.46
Author: Remcon
Submitted by: Remcon
LOP 1.45
Author: Remcon
Submitted by: Remcon
Users Online
CommonCrawl, DotBot, Yandex, Google

Members: 0
Guests: 14
Stats
Files
Topics
Posts
Members
Newest Member
481
3,739
19,386
621
KellieBusb
Today's Birthdays
Rane (42)
Related Links
» SmaugMuds.org » General » Smaug Snippets » dlsym question
Forum Rules | Mark all | Recent Posts

dlsym question
< Newer Topic :: Older Topic > Question about snippet

Pages:<< prev 1 next >>
Post is unread #1 Feb 2, 2005, 4:56 pm
Go to the top of the page
Go to the bottom of the page

Zarius
Apprentice
GroupMembers
Posts69
JoinedApr 23, 2002

I installed the dlsym snippet into a Smaug and I think I found a bug, but I can't seem to fix it. In Cedit if you create a command and change the code, it doesn't change the fun_name, but the code is changed. If I add in (From AFKMud)

DISPOSE( command->fun_name );command->fun_name = str_dup( argument );


I get a segfault when I change the code fun

*** glibc detected *** double free or corruption (out): 0x0a3aa800 ***

Any clue why this isn't working or how to fix the problem, its driving me nuts
       
Post is unread #2 Feb 2, 2005, 5:05 pm
Go to the top of the page
Go to the bottom of the page

Zarius
Apprentice
GroupMembers
Posts69
JoinedApr 23, 2002

Well, I solved my own issue.

In the snippet it says to add this line

command->fun_name = STRALLOC( arg2 );


I changed that to

command->fun_name = str_dup( arg2 );


Also added

DISPOSE(command->fun_name);


to free_commands function.

I knew as soon as I posted it, I'd figure it out.
       
Post is unread #3 Feb 2, 2005, 8:46 pm
Go to the top of the page
Go to the bottom of the page

Samson
Black Hand
GroupAdministrators
Posts3,643
JoinedJan 1, 2002

Yikes, thanks for that fix Zarius. Don't know how that one got past me

Anyway, the snippet has now been updated to include the missed steps and to correct the memory bug.
       
Pages:<< prev 1 next >>