--- deliantra/server/common/shstr.C 2006/09/03 00:18:40 1.3 +++ deliantra/server/common/shstr.C 2006/09/03 08:05:39 1.4 @@ -51,6 +51,9 @@ const char * shstr::find (const char *s) { + if (!s) + return s; + HT::iterator i = ht.find (s); return i != ht.end () @@ -61,10 +64,11 @@ const char * shstr::intern (const char *s) { - HT::iterator i = ht.find (s); + if (!s) + return s; - if (i != ht.end ()) - return (char *)*i; + if (const char *found = find (s)) + return found; int len = strlen (s);