shithub: choc

Download patch

ref: 27b9f8bdac5b224615bec43cc15e758a7a6ef601
parent: 99f836fcb772f4720066975d79909719b03398c8
author: Simon Howard <[email protected]>
date: Sat Sep 2 15:01:35 EDT 2006

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

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 594

--- 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
 //
@@ -160,6 +160,11 @@
         {
             // end of file
 
+            return NULL;
+        }
+
+        if (c == '\0')
+        {
             return NULL;
         }