Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ SMAUG ➜ SMAUG coding ➜ Swfote core dump move to room with another player

Swfote core dump move to room with another player

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2 

Posted by Nick Gammon   Australia  (23,169 posts)  Bio   Forum Administrator
Date Reply #15 on Sat 11 Apr 2015 03:38 AM (UTC)

Amended on Sat 11 Apr 2015 03:39 AM (UTC) by Nick Gammon

Message
A bit more debugging reveals line 520 in act_info.c is this:


520	        sprintf(colorbuf, "&w&W%s", color_str( AT_IMMORT, ch) );


AT_IMMORT is 32, so let's see what color_str gives us:


(gdb) p  color_str( 32, ch)
$2 = 0x100251d08 "\033[1;37m"


So we are putting this into colorbuf:


&w&W\033[1;37m


And how big is colorbuf?


    char colorbuf[4];


Problem.

I made colorbuf 40 bytes and it ran without crashing.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by MattJ820   (32 posts)  Bio
Date Reply #16 on Sat 11 Apr 2015 08:58 PM (UTC)
Message
That worked Nick, thanks for your help.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


61,154 views.

This is page 2, subject is 2 pages long:  [Previous page]  1  2 

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.