mirror of
https://github.com/glest/glest-source.git
synced 2025-08-12 03:14:00 +02:00
- fixed some bugs discovered by coverity scan
This commit is contained in:
@@ -85,6 +85,7 @@ private:
|
||||
string fileName;
|
||||
|
||||
public:
|
||||
OggSoundFileLoader();
|
||||
virtual void open(const string &path, SoundInfo *soundInfo);
|
||||
virtual uint32 read(int8 *samples, uint32 size);
|
||||
virtual void close();
|
||||
|
@@ -254,6 +254,9 @@ int zipfile_tool(int argc, const char *argv[]) {
|
||||
uint n = BUF_SIZE - stream.avail_out;
|
||||
if (fwrite(s_outbuf, 1, n, pOutfile) != n) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("Failed writing to output file!\n");
|
||||
|
||||
if(pInfile) fclose(pInfile);
|
||||
if(pOutfile) fclose(pOutfile);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
stream.next_out = s_outbuf;
|
||||
|
@@ -107,7 +107,7 @@ public:
|
||||
base_thread->signalQuit();
|
||||
sleep(10);
|
||||
|
||||
if(Thread::getEnableVerboseMode()) printf("!!!! cleanupPendingThread Line: %d thread = %p [%s]\n",__LINE__,thread,(base_thread != NULL ? base_thread->getUniqueID().c_str() : "n/a"));
|
||||
if(Thread::getEnableVerboseMode()) printf("!!!! cleanupPendingThread Line: %d thread = %p [%s]\n",__LINE__,thread,base_thread->getUniqueID().c_str());
|
||||
|
||||
if(base_thread->getRunningStatus() == true || base_thread->getExecutingTask() == true) {
|
||||
|
||||
|
@@ -201,6 +201,11 @@ void WavSoundFileLoader::restart(){
|
||||
// Ogg Sound File Loader
|
||||
// =======================================
|
||||
|
||||
OggSoundFileLoader::OggSoundFileLoader() {
|
||||
vf = NULL;
|
||||
f = NULL;
|
||||
}
|
||||
|
||||
void OggSoundFileLoader::open(const string &path, SoundInfo *soundInfo){
|
||||
fileName = path;
|
||||
|
||||
|
Reference in New Issue
Block a user