Solution: Message showing twice, possibly cut

The place to post your WML questions and answers.

Moderator: Forum Moderators

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Solution: Message showing twice, possibly cut

Post by Dugi »

I am not asking anybody for help, just this problem might happen to somebody else and I think it is good if a solution to it is available.

I have found a hard to debug problem. If pango formatting (that is, the <b> or <i> things) is messed up somewhere, a strange error appears, causing the previous message to display instead of the new one.

If the code looks like this:

Code: Select all

[message]
 speaker=Krakatulus
 message= _ "I was standing in my room, completely alone, when suddenly..."
[/message]
[message]
 speaker=Krakatulus
 message= _ "I heard a fart that <b>wasn't mine</i>."
[/message]
You will first see a message 'I was standing in my room, completely alone, when suddenly...' and then 'I was standing in my room, completely a'. This is because the message's length was read correctly, but the text failed to load, and so it read what was in the variable holding the text before, and that was the previous message.
Last edited by Dugi on July 31st, 2013, 6:56 am, edited 1 time in total.
User avatar
8680
Moderator Emeritus
Posts: 742
Joined: March 20th, 2011, 11:45 pm
Location: The past

Re: Solution: Message showing twice, possibly cut

Post by 8680 »

This would appear to me to be a bug. Please report it at Wesnoth’s issue tracker on Gna.
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: Solution: Message showing twice, possibly cut

Post by Dugi »

Done.
User avatar
8680
Moderator Emeritus
Posts: 742
Joined: March 20th, 2011, 11:45 pm
Location: The past

Re: Solution: Message showing twice, possibly cut

Post by 8680 »

Dugi wrote:Done.
Thanks.

(For the record, the bug report is #20996 on Gna.)
Post Reply