tags 500415 + patch thanks Hi,
the attached patch made the game work for me again. I have prepared an NMU with two other minor changes (fix call of make clean and a typo in the man page) that I will upload next week, or earlier if that is ok with you. Regards, Ansgar -- PGP: 1024D/595FAD19 739E 2D09 0969 BEA9 9797 B055 DDB0 2FF7 595F AD19
#! /bin/sh /usr/share/dpatch/dpatch-run ## 30_dont_crash_if_no_sound_files.dpatch by Ansgar Burchardt <[EMAIL PROTECTED]> ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Do not crash if there are no sound files in viruskiller.pak @DPATCH@ diff --git a/src/CAudio.cpp b/src/CAudio.cpp index 6adc59b..4d38015 100644 --- a/src/CAudio.cpp +++ b/src/CAudio.cpp @@ -72,7 +72,7 @@ bool Audio::loadSound(int i, char *filename) } #if USEPAK - engine->unpack(filename, PAK_SOUND); + if (engine->unpack(filename, PAK_SOUND)) sound[i] = Mix_LoadWAV_RW(engine->sdlrw, 1); #else sound[i] = Mix_LoadWAV(filename); @@ -111,7 +111,7 @@ bool Audio::loadMusic(char *filename) } #if USEPAK - engine->unpack(filename, PAK_MUSIC); + if (engine->unpack(filename, PAK_MUSIC)) music = Mix_LoadMUS(tempPath); #else music = Mix_LoadMUS(filename);