TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

segmentation fault in #showme

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
lilmike



Joined: 08 Feb 2015
Posts: 18
Location: Baton Rouge, Louisiana

PostPosted: Sun Mar 18, 2018 10:29 pm    Post subject: segmentation fault in #showme Reply with quote

Hi,
I, along with some friends, have a tintin feature pack for the mud alter aeon. One of the features that it has is to take long or unnecessarily "spammy" messages and shorten them. One of the messages it shortens is "... *** ... *** ...!" and just takes the *** and turns it into *
However, when this action runs (and the setting to shorten messages is enabled), tintin crashes.

Sample code/reproduction:

Code:

#action {%1 *** %2 *** %3!$} {
                #variable {cspam.formatString} {%0};
                #replace {cspam.formatString} {***} {*};
                #showme {${cspam.formatString}};
                #line {gag}
}
{1}


Then just run:

Code:

#showme {Its leaping attack *** DEMOLISHES *** you!}


Crash incoming!
-Michael.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3844

PostPosted: Mon Mar 19, 2018 6:47 pm    Post subject: Reply with quote

I'll look into it. Could of course try:

Code:

#sub {%1 *** %2 *** %3!$} {%1 * %2 * %3!}


Also keep in mind . notation is no longer valid as of the next release as there were too many issues with that code. So you'd want to use $cspam[formatString] instead.
Back to top
View user's profile Send private message Send e-mail
lilmike



Joined: 08 Feb 2015
Posts: 18
Location: Baton Rouge, Louisiana

PostPosted: Tue Mar 20, 2018 9:04 am    Post subject: Reply with quote

Hi,
Thanks for the headsup on the dot notation. And I don't think it's the #replace crashing it, instead it's the #showme. At least that's what the core says (if you need a core let me know, but I suspect with the reproduction code it won't be an issue).
-Michael.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3844

PostPosted: Tue Mar 20, 2018 4:59 pm    Post subject: Reply with quote

It's a recursion problem, because *** is escaped as \*\*\* in the latest release.

I'll see about only escaping proper variables.

Try using:

#line ignore #showme {${cspam[formatString]}};

That will avoid trigger loops.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Bug Reports All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group