google-code-export / p-g-qvm

Automatically exported from code.google.com/p/p-g-qvm
Other
1 stars 0 forks source link

Allow use of % symbol #30

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Just one little thing that has always irked me. Clients cannot use the
percent symbol in anything.

It gets parsed out and replaced with a . (period)

What i am proposing is keeping the current system of converting the raw %
symbol to a period, because that can cause all kinds of problems with the
server, but adding an escaped mechanism, ie adding a \% system, to allow
clients to use them in messages.

I don't know how difficult this would be, but it is something that has been
of request for quite a long period of time.

Original issue reported on code.google.com by Paradox460 on 25 Jan 2008 at 11:22

GoogleCodeExporter commented 9 years ago
percent signs are parsed out of client <--> server messages in qcommon/msg.c, 
this is
not code in the qvm.

It is there to avoid the chance of things like a message with "%s" from 
accessing
random memory if a bit of code does something stupid like printf( message ).

To test this try adding the % sign to one of the strings the server will print 
to the
client and see how the client displays it, my guess is the client will also 
parse the
'%' into a '.'

(I haven't actually tried it yet, just guessing that it is not possible with 
existing
clients)

Original comment by Rez...@gmail.com on 26 Jan 2008 at 12:05

GoogleCodeExporter commented 9 years ago
Made a quick qvm build that had the percent sign in the DECONSTRUCT messages 
sent to
the team, client filters it to be a dot '.'.

This can not be done without a new client that does not filter, or can parse 
escapes
for '%'.

Original comment by Rez...@gmail.com on 26 Jan 2008 at 3:37

GoogleCodeExporter commented 9 years ago
Meh, i thought as much.

Original comment by Paradox460 on 27 Jan 2008 at 2:53