Bug - Fixed Out of range bug when reading charpane

edgy

Member
I've been getting an 2 "5898265535 out of range, returning 0" errors everything the charpane refreshes. The errors has the added effect of mafia thinking both myst and mox is 0. Worth noting is that automated adventuring sets all stats back to the expected value, so this is likely just a relay browser issue.

Debug log from a manual refresh of charpane has been attached to this message.

Edit: Loaded up the code found the likely culprit:
Code:
 CharPaneRequest.java line 504:
modified[ i ] =StringUtilities.parseInt( statMatcher.group( i + 1 ).replaceAll( "<[^>]*>", "" ).replaceAll("[^\\d]+", "" ) );
which doesn't to handle stat string such as: <font color=red>58982</font> (65535) correctly and ends up trying to parse 5898265535 into an int.
 

Attachments

  • DEBUG_20150516.txt
    15.5 KB · Views: 47
Last edited:

heeheehee

Developer
Staff member
Stealth charpane update breaks Mafia (de)buffed stat parsing

Here's the relevant code:

Code:
<table align=center><tr><td align=right>Muscle:</td><td align=left><b><font color=red>90</font> (112)</b><table title='212 / 225' cellpadding=0 cellspacing=0 style='border: 1px solid #5A5A5A'><tr><td height=3 width=47 bgcolor=#5A5A5A></td><td width=3 bgcolor=white></td></tr></table></td></tr><tr><td align=right>Mysticality:</td><td align=left><b>162</b><table title='86 / 325' cellpadding=0 cellspacing=0 style='border: 1px solid #5A5A5A'><tr><td height=3 width=13 bgcolor=#5A5A5A></td><td width=37 bgcolor=white></td></tr></table></td></tr><tr><td align=right>Moxie:</td><td align=left><b><font color=blue>180</font> (114)</b><table title='129 / 229' cellpadding=0 cellspacing=0 style='border: 1px solid #5A5A5A'><tr><td height=3 width=28 bgcolor=#5A5A5A></td><td width=22 bgcolor=white></td></tr></table>

CharPaneRequest, line 482: color=blue should be changed to color=(?:red|blue)
 

Veracity

Developer
Staff member
This looks like a dup; edgy also had a "color=red" stat.
I'm testing your suggested patch.
 
Top