foxygit / doom Log in
commit 27b9f8bdac5b224615bec43cc15e758a7a6ef601
Author:     Simon Howard <fraggle@gmail.com>
AuthorDate: Sat Sep 2 19:01:35 2006 +0000
Commit:     Simon Howard <fraggle@gmail.com>
CommitDate: Sat Sep 2 19:01:35 2006 +0000

    Don't allow \0 in dehacked strings read with DEH_ReadLine.

    Subversion-branch: /trunk/chocolate-doom
    Subversion-revision: 594
---
 src/deh_io.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/deh_io.c b/src/deh_io.c
index 65185ea1..5fd2b546 100644
--- a/src/deh_io.c
+++ b/src/deh_io.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*-
 //-----------------------------------------------------------------------------
 //
-// $Id: deh_io.c 175 2005-10-08 20:54:16Z fraggle $
+// $Id: deh_io.c 594 2006-09-02 19:01:35Z fraggle $
 //
 // Copyright(C) 2005 Simon Howard
 //
@@ -163,6 +163,11 @@ char *DEH_ReadLine(deh_context_t *context)
             return NULL;
         }

+        if (c == '\0')
+        {
+            return NULL;
+        }
+
         // cope with lines of any length: increase the buffer size

         if (pos >= context->readbuffer_size)