Wide string class bug.

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
disanti
Posts: 367
Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:

Wide string class bug.

Post by disanti »

Hello,
I ran into a slight problem with the irr::core::stringw class today. I noticed that if you make a string like this:

Code: Select all

(irr::core::stringw(anInteger)+L"%").c_str()
If this is used in GUI, it doesn't place the percentage symbol. Instead it places a '. Try it yourself.

Here is an example to try:

Code: Select all

myStaticText->setText((irr::core::stringw(100)+L"%").c_str());
Your output should be: 100'
:roll:

Hope this gets fixed, thank you~ John DiSanti
________
Roll a joint
Last edited by disanti on Thu Feb 24, 2011 10:39 am, edited 1 time in total.
don_Pedro
Posts: 84
Joined: Fri Jun 10, 2005 1:34 pm
Location: Poland
Contact:

Post by don_Pedro »

It's not bug, use

Code: Select all

myStaticText->setText((irr::core::stringw(100)+L"%%").c_str());
disanti
Posts: 367
Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:

Post by disanti »

No, that didn't appear to fix it. Thanks for the information though. I'm getting the same '.
________
MARY JANE
Last edited by disanti on Thu Feb 24, 2011 10:39 am, edited 1 time in total.
Guest

Post by Guest »

It works for me.. what OS are you using?
disanti
Posts: 367
Joined: Sat Jan 17, 2004 1:36 am
Location: California, US
Contact:

Post by disanti »

I'm on Linux, specifically Fedora Core 4.
________
The Girls Next Door Forum
Last edited by disanti on Thu Feb 24, 2011 10:39 am, edited 1 time in total.
niko
Site Admin
Posts: 1759
Joined: Fri Aug 22, 2003 4:44 am
Location: Vienna, Austria
Contact:

Post by niko »

Ok, thanks, I'll take a look at it. You could work around this using wsprintf and others, as long there is no fix for it.
Post Reply