foxygit / doom Log in
commit b73f2d5ba8bc0e86b574aa8d82226b0977e07b68
Author:     Simon Howard <fraggle@gmail.com>
AuthorDate: Sat Mar 11 21:34:19 2006 +0000
Commit:     Simon Howard <fraggle@gmail.com>
CommitDate: Sat Mar 11 21:34:19 2006 +0000

    Shut up compiler warnings

    Subversion-branch: /trunk/chocolate-doom
    Subversion-revision: 417
---
 src/deh_cheat.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/deh_cheat.c b/src/deh_cheat.c
index c4f05bc1..a61a15e6 100644
--- a/src/deh_cheat.c
+++ b/src/deh_cheat.c
@@ -1,7 +1,7 @@
 // Emacs style mode select   -*- C++ -*-
 //-----------------------------------------------------------------------------
 //
-// $Id: deh_cheat.c 175 2005-10-08 20:54:16Z fraggle $
+// $Id: deh_cheat.c 417 2006-03-11 21:34:19Z fraggle $
 //
 // Copyright(C) 2005 Simon Howard
 //
@@ -99,10 +99,11 @@ static void DEH_CheatParseLine(deh_context_t *context, char *line, void *tag)
 {
     deh_cheat_t *cheat;
     char *variable_name;
-    unsigned char *value;
+    char *value;
+    unsigned char *unsvalue;
     int i;

-    if (!DEH_ParseAssignment(line, &variable_name, (char **) &value))
+    if (!DEH_ParseAssignment(line, &variable_name, &value))
     {
         // Failed to parse

@@ -110,6 +111,8 @@ static void DEH_CheatParseLine(deh_context_t *context, char *line, void *tag)
         return;
     }

+    unsvalue = (unsigned char *) value;
+
     cheat = FindCheatByName(variable_name);

     if (cheat == NULL)
@@ -121,9 +124,9 @@ static void DEH_CheatParseLine(deh_context_t *context, char *line, void *tag)
     // write the value into the cheat sequence

     for (i=0;
-         i<cheat->seq->sequence_len && value[i] != 0 && value[i] != 0xff;
+         i<cheat->seq->sequence_len && unsvalue[i] != 0 && unsvalue[i] != 0xff;
          ++i)
-        cheat->seq->sequence[i] = value[i];
+        cheat->seq->sequence[i] = unsvalue[i];

     cheat->seq->sequence[i] = '\0';
 }