mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 04:42:32 +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
694a405578
commit
6702f04b46
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