[Fix] Nailed the memory leak and a silly error.
This commit is contained in:
parent
67dba8aaeb
commit
bf6577ccc1
@ -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));
|
||||||
|
@ -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.
|
||||||
|
Loading…
Reference in New Issue
Block a user