rewind(fp);
- dataBuffer = new unsigned char[fSize];
+ dataBuffer = new unsigned char[fSize + 1];
fread(dataBuffer, 1, fSize, fp);
+ dataBuffer[fSize] = 0;
fclose(fp);
blit(wordSurface, x, y, surface, false);
- SDL_FreeSurface(wordSurface);
-
x += wordSurface->w;
+ SDL_FreeSurface(wordSurface);
+
word = strtok(NULL, " ");
}
}
{
debug(("Deleting unreferenced Boss...\n"));
+ if(map.mainBossPart == map.boss[i])
+ map.mainBossPart = NULL;
delete map.boss[i];
map.boss[i] = NULL;
- }
-
- self->referenced = false;
+ } else
+ self->referenced = false;
}
}
else if (self->actionFinished())
void createSceneList()
{
- char sceneLine[1024];
+ char sceneLine[1024] = "";
char *line = NULL;
int waitTime = 0;
Cutscene *scene = NULL;
SDL_mutexV(medalServer.lock);
- delete tname;
+ delete[] tname;
return type;
}