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

#format {%L} reports wrong size

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



Joined: 29 Jul 2006
Posts: 84

PostPosted: Thu Dec 13, 2007 2:12 pm    Post subject: #format {%L} reports wrong size Reply with quote

#format {%L} reports the wrong length for colored strings: it doesn't strip the color codes from it.
I could fix it on my own though: in variables.c, DO_COMMAND(do_format):
Code:

case 'L':
                  strip_vt102_codes(arglist[i],arglist[i]);
                  sprintf(arglist[i], "%d", (int) strlen(arglist[i]));
                  break;

just add that strip_vt102_codes line, that did the trick for me.
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3796

PostPosted: Thu Dec 13, 2007 2:19 pm    Post subject: Reply with quote

If you update to the last release (1.97.8) it's fixed as well Coffee Wink
Back to top
View user's profile Send private message Send e-mail
titeuf



Joined: 29 Jul 2006
Posts: 84

PostPosted: Thu Dec 13, 2007 2:49 pm    Post subject: Reply with quote

oh right, forgot there was a new version out...hrm... I'll have to change my scripts, search & replace for the win! Cool
Back to top
View user's profile Send private message
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