View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002431SphereServerexecutable - genericpublic07-12-14 17:4923-03-15 17:11
ReporterCoruja 
Assigned ToCoruja 
PrioritynormalSeveritytextReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version0.56c Nightly 
Summary0002431: TAGLIST / CTAGLIST / VARLIST unicode text parsing
Descriptionthe internal function DumpKeys() [/common/CVarDefMap.cpp, line 630] is using a \n on the sysmessage, and this thing is breaking the text of functions TAGLIST / CTAGLIST / VARLIST with many blank spaces between all lines

example: If I use TAGLIST function ingame, it will return
TAG.A=1

TAG.B=2

TAG.C=3

instead

TAG.A=1
TAG.B=2
TAG.C=3

to fix it, the \n must be used only if the function is called by sphere console, but not on ingame clients.

I have no idea how I can check if the function is called by console or ingame client, so I'm opening this thread to someone take a better look :P
Steps To Reproducejust type .TAGLIST ingame

it can be reproduced only using SMSG_DEF_UNICODE=1 on sphere_msgs.scp (I'm not sure why, maybe because unicode texts can parse \n and non-unicode texts will just ignore it)
TagsNo tags attached.
Nightly VersionAutomated (specify build number)
Experimental FlagsNone
Option FlagsNone
Internal Build Number
Attached Files

- Relationships

-  Notes
(0002578)
Ben (manager)
07-12-14 23:48

As far as I can tell from my tests, this only happens on pre-SA clients.
I managed to reproduce with client 6.0.14.3 but not with 3 other clients above 7.0.10.3
Not sure it's even worth trying to fix if it's a client parsing issue...
(0002749)
XuN (developer)
23-03-15 16:27

Not sure of the problem really, but if it can be solved with a simple check for clients with versions lower than 7013, then use this:

        if (pSrc->GetChar() && pSrc->GetChar()->GetClient()->GetNetState()->isClientLessVersion(7013))
            pSrc->SysMessagef("%s%s=%s", static_cast<LPCTSTR>(pszPrefix), static_cast<LPCTSTR>(pVar->GetKey()), static_cast<LPCTSTR>(pVar->GetValStr()));
        else
            pSrc->SysMessagef("%s%s=%s\n", static_cast<LPCTSTR>(pszPrefix), static_cast<LPCTSTR>(pVar->GetKey()), static_cast<LPCTSTR>(pVar->GetValStr()));
(0002751)
Coruja (developer)
23-03-15 17:11

roflmao I spent many hours trying to get the client version inside DumpKeys() and you made it in just some seconds :D

but anyway, I think it's better doesnt use \n on all clients instead only on clients > 7xxx, because this \n is not really needed on any client version (only console/logs will need it)

so I just made a simple check to avoid \n on all clients, I dont know if this will break texts on console/logs, but apparently everything is working fine (I tested it using '.taglist' on client 5.0.2 / 7.0.44 and also 'show uid.123456.taglist' on console, and both are working fine)

- Issue History
Date Modified Username Field Change
07-12-14 17:49 Coruja New Issue
07-12-14 23:48 Ben Note Added: 0002578
23-03-15 16:27 XuN Note Added: 0002749
23-03-15 17:11 Coruja Note Added: 0002751
23-03-15 17:11 Coruja Status new => resolved
23-03-15 17:11 Coruja Fixed in Version => 0.56c Nightly
23-03-15 17:11 Coruja Resolution open => fixed
23-03-15 17:11 Coruja Assigned To => Coruja


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker