# HG changeset patch # User rubidium # Date 2009-02-21 00:47:59 # Node ID e190c026199859d4d39c1c182e27575a43f3577d # Parent 50e33a2511bf2ffa3417ce52ed2c79330d4f5cdf (svn r15537) -Fix (r5215): don't allow special sprite characters (e.g. the ship sprite) as characters in input like filenames or text that is sent over the network. diff --git a/src/string.cpp b/src/string.cpp --- a/src/string.cpp +++ b/src/string.cpp @@ -104,8 +104,7 @@ void str_validate(char *str, bool allow_ size_t len; for (len = Utf8Decode(&c, str); c != '\0'; len = Utf8Decode(&c, str)) { - if (IsPrintable(c) && (c < SCC_SPRITE_START || c > SCC_SPRITE_END || - IsValidChar(c - SCC_SPRITE_START, CS_ALPHANUMERAL))) { + if (IsPrintable(c) && (c < SCC_SPRITE_START || c > SCC_SPRITE_END)) { /* Copy the character back. Even if dst is current the same as str * (i.e. no characters have been changed) this is quicker than * moving the pointers ahead by len */