ID:109391
 
Resolved
Telnet output was sometimes inappropriately ignoring whitespace at the beginning of a line.
BYOND Version:479
Operating System:Windows 7 Home Premium
Web Browser:Chrome 9.0.597.94
Applies to:Dream Daemon
Status: Resolved (480)

This issue has been resolved.
Descriptive Problem Summary:
There seems to be some kind of issue with BYOND discarding extra whitespace when used with certain escapes (all of the color-related ones, for example).

Code Snippet (if applicable) to Reproduce Problem:
client
Command(cmd)
src << "You said: [cmd]"

New()
..()

src << "[ANSI_YELLOW] ABC"
src << " [ANSI_CRIMSON]ABC"
src << " [ANSI_CRIMSON] ABC"
src << " ABC.\n\
[ANSI_CYAN] DEF.\n\
[ANSI_LIME] GHI"


Expected Results:
It would output data like so:
\     ABC
\[1;31mABC
\[1;31m ABC
ABC.
\ DEF.
\ GHI


(the \ represents the ESC character)

Actual Results:
It outputs the data like so:
\[1;33mABC
\[1;31mABC
\[1;31m ABC
ABC.
\[1;36mDEF.
\GHI


Also, I created a separate client to connect to the world so I could read the individual bytes that are being sent, so this is definitely not an error on the part of the telnet client or anything like that. This is the representation of the data byte by byte.

Does the problem occur:
Every time? Or how often? Every time.
In other games? Yes.
In other user accounts? Yes.
On other computers? Yes.