diff options
author | Simon Howard | 2006-10-28 00:23:11 +0000 |
---|---|---|
committer | Simon Howard | 2006-10-28 00:23:11 +0000 |
commit | c39b37221169c959dc5746c9d009f8574ff7731e (patch) | |
tree | fd0b1192f903bad2241256f9ba722672a86aab5e /src/deh_sound.c | |
parent | 3579a07a56d6bdd2150e6d3a07817b60b53cea20 (diff) | |
download | chocolate-doom-c39b37221169c959dc5746c9d009f8574ff7731e.tar.gz chocolate-doom-c39b37221169c959dc5746c9d009f8574ff7731e.tar.bz2 chocolate-doom-c39b37221169c959dc5746c9d009f8574ff7731e.zip |
Display a warning when setting dehacked fields that would overflow
buffers in Vanilla dehacked. This should help pick up bugs like the one
in Batman Doom.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 742
Diffstat (limited to 'src/deh_sound.c')
-rw-r--r-- | src/deh_sound.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/deh_sound.c b/src/deh_sound.c index 180108c0..9f99384b 100644 --- a/src/deh_sound.c +++ b/src/deh_sound.c @@ -61,6 +61,12 @@ static void *DEH_SoundStart(deh_context_t *context, char *line) DEH_Warning(context, "Invalid sound number: %i", sound_number); return NULL; } + + if (sound_number >= DEH_VANILLA_NUMSFX) + { + DEH_Warning(context, "Attempt to modify SFX %i. This will problems " + "in Vanilla dehacked.", sound_number); + } sfx = &S_sfx[sound_number]; |