mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Fix key resetting.
Make sure we don't add a new key-pair when the key already exists, and if the existing value has the same pointer as the "new" value, do nothing.
This commit is contained in:
parent
3f08268038
commit
670d9155e7
1 changed files with 3 additions and 0 deletions
|
@ -175,8 +175,11 @@ vec3_t bad_maxs = {8, 8, 8};
|
|||
|
||||
for (e = epairs; e; e = e->next) {
|
||||
if (!strcmp (k, e->key)) {
|
||||
if (e->value == v)
|
||||
return;
|
||||
free (e->value);
|
||||
e->value = strdup (v);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue