[Fix] Nailed the memory leak and a silly error.

This commit is contained in:
Allanis 2013-04-03 19:49:05 +01:00
parent 67dba8aaeb
commit bf6577ccc1
2 changed files with 2 additions and 2 deletions

View File

@ -513,7 +513,7 @@ int pilot_rmOutfit(Pilot* pilot, Outfit* outfit, int quantity) {
// Remove the outfit. // Remove the outfit.
memmove(pilot->outfits+i, pilot->outfits+i+1, memmove(pilot->outfits+i, pilot->outfits+i+1,
sizeof(PilotOutfit)*(pilot->noutfits-i)); sizeof(PilotOutfit)*(pilot->noutfits-i-1));
pilot->noutfits--; pilot->noutfits--;
pilot->outfits = realloc(pilot->outfits, pilot->outfits = realloc(pilot->outfits,
sizeof(PilotOutfit)*(pilot->noutfits)); sizeof(PilotOutfit)*(pilot->noutfits));

View File

@ -1444,7 +1444,7 @@ static void dialogue_msgClose(char* str) {
(void)str; (void)str;
window_destroy(msg_wid); window_destroy(msg_wid);
msg_wid = 0; msg_wid = 0;
loop_done = 0; loop_done = 1;
} }
// Runs a dialogue with a Yes No button, return 1 if yes. // Runs a dialogue with a Yes No button, return 1 if yes.