kruton / tinyfugue

Tinyfugue MUD client (tf) with UTF-8 patches for Unicode MUDs.
http://tinyfugue.sourceforge.net/
Other
36 stars 20 forks source link

Add Telnet character set negotiation #3

Closed Sketch closed 12 years ago

Sketch commented 12 years ago

Now TinyFugue can negotiate charsets. Useful since modern TinyMUX does this. Note: This patch does not implement alternate character set handling, only negotiation. All text coming from servers is assumed to be UTF-8, regardless of negotiated character set. This patch does not implement the TTABLE option.

Sketch commented 12 years ago

Since there's a guard check for (xsock->subbuffer->len > 255) before telnet_subnegotiation is called, and then the string is shortened by 2 bytes at the top of telnet_subnegotiation, there's no risk of overflow when writing to temp_buff.