diff options
author | Simon Howard | 2006-03-11 21:34:19 +0000 |
---|---|---|
committer | Simon Howard | 2006-03-11 21:34:19 +0000 |
commit | b73f2d5ba8bc0e86b574aa8d82226b0977e07b68 (patch) | |
tree | e03911d5c7e896497e4db1fa28f0b647426cff8f /src | |
parent | 8f7d3a414205a1b9b609b00cb786b4d7d3cac14a (diff) | |
download | chocolate-doom-b73f2d5ba8bc0e86b574aa8d82226b0977e07b68.tar.gz chocolate-doom-b73f2d5ba8bc0e86b574aa8d82226b0977e07b68.tar.bz2 chocolate-doom-b73f2d5ba8bc0e86b574aa8d82226b0977e07b68.zip |
Shut up compiler warnings
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 417
Diffstat (limited to 'src')
-rw-r--r-- | src/deh_cheat.c | 13 |
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'; } |