summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/deh_cheat.c13
1 files 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';
}