forked from lda/telodendria
Fix bug in floating objects to mostRecent
This commit is contained in:
parent
40e5c1ef2a
commit
973e826e57
1 changed files with 4 additions and 1 deletions
5
src/Db.c
5
src/Db.c
|
@ -404,12 +404,15 @@ DbLockFromArr(Db * db, Array * args)
|
||||||
if (ref->next)
|
if (ref->next)
|
||||||
{
|
{
|
||||||
ref->next->prev = ref->prev;
|
ref->next->prev = ref->prev;
|
||||||
ref->prev->next = ref->next;
|
|
||||||
|
|
||||||
if (!ref->prev)
|
if (!ref->prev)
|
||||||
{
|
{
|
||||||
db->leastRecent = ref->next;
|
db->leastRecent = ref->next;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ref->prev->next = ref->next;
|
||||||
|
}
|
||||||
|
|
||||||
ref->prev = db->mostRecent;
|
ref->prev = db->mostRecent;
|
||||||
ref->next = NULL;
|
ref->next = NULL;
|
||||||
|
|
Loading…
Reference in a new issue