mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-18 18:01:13 +00:00
_ is legal in an unquoted string and make PL_ObjectForKey return the correct
value
This commit is contained in:
parent
2a96ffb19b
commit
8fa4bff0c4
1 changed files with 3 additions and 2 deletions
|
@ -93,7 +93,8 @@ dict_free (void *i, void *unused)
|
||||||
plitem_t *
|
plitem_t *
|
||||||
PL_ObjectForKey (hashtab_t *table, const char *key)
|
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
|
static qboolean
|
||||||
|
@ -298,7 +299,7 @@ PL_ParseUnquotedString (pldata_t *pl)
|
||||||
char *str;
|
char *str;
|
||||||
|
|
||||||
while (pl->pos < pl->end) {
|
while (pl->pos < pl->end) {
|
||||||
if (!isalnum (pl->ptr[pl->pos]))
|
if (!isalnum (pl->ptr[pl->pos]) && pl->ptr[pl->pos] != '_')
|
||||||
break;
|
break;
|
||||||
pl->pos++;
|
pl->pos++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue