_ is legal in an unquoted string and make PL_ObjectForKey return the correct

value
This commit is contained in:
Bill Currie 2001-08-01 16:07:39 +00:00
parent 2a96ffb19b
commit 8fa4bff0c4
1 changed files with 3 additions and 2 deletions

View File

@ -93,7 +93,8 @@ dict_free (void *i, void *unused)
plitem_t *
PL_ObjectForKey (hashtab_t *table, const char *key)
{
return (plitem_t *) Hash_Find (table, key);
dictkey_t *k = (dictkey_t *) Hash_Find (table, key);
return k ? k->value : NULL;
}
static qboolean
@ -298,7 +299,7 @@ PL_ParseUnquotedString (pldata_t *pl)
char *str;
while (pl->pos < pl->end) {
if (!isalnum (pl->ptr[pl->pos]))
if (!isalnum (pl->ptr[pl->pos]) && pl->ptr[pl->pos] != '_')
break;
pl->pos++;
}