shithub: choc

Download patch

ref: b73f2d5ba8bc0e86b574aa8d82226b0977e07b68
parent: 8f7d3a414205a1b9b609b00cb786b4d7d3cac14a
author: Simon Howard <[email protected]>
date: Sat Mar 11 16:34:19 EST 2006

Shut up compiler warnings

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

--- 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 @@
 {
     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 @@
         return;
     }
 
+    unsvalue = (unsigned char *) value;
+
     cheat = FindCheatByName(variable_name);
 
     if (cheat == NULL)
@@ -121,9 +124,9 @@
     // 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';
 }