foxygit / doom Log in
commit fb364d533b2a6510611ca3edf533176204a1fd59
Author:     Simon Howard <fraggle@gmail.com>
AuthorDate: Mon Sep 12 21:30:26 2011 +0000
Commit:     Simon Howard <fraggle@gmail.com>
CommitDate: Mon Sep 12 21:30:26 2011 +0000

    Fix bug in doubly-linked list implementation.

    Subversion-branch: /branches/strife-branch
    Subversion-revision: 2368
---
 src/i_sdlsound.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/i_sdlsound.c b/src/i_sdlsound.c
index e3118a82..4169a921 100644
--- a/src/i_sdlsound.c
+++ b/src/i_sdlsound.c
@@ -101,6 +101,10 @@ static void AllocatedSoundLink(allocated_sound_t *snd)
     {
         allocated_sounds_tail = snd;
     }
+    else
+    {
+        snd->next->prev = snd;
+    }
 }

 // Unlink a sound from the linked list.