[Fix] Small bug fixes.

This commit is contained in:
Allanis 2013-04-04 18:22:04 +01:00
parent 2388dbcef0
commit 97bd83e7da
2 changed files with 2 additions and 1 deletions

View File

@ -219,6 +219,7 @@ char** space_getFactionPlanet(int* nplanets, int* factions, int nfactions) {
tmp = realloc(tmp, sizeof(char*) * mtmp); tmp = realloc(tmp, sizeof(char*) * mtmp);
} }
tmp[ntmp-1] = planet->name; tmp[ntmp-1] = planet->name;
break; // No need to check all factions.
} }
} }
(*nplanets) = ntmp; (*nplanets) = ntmp;

View File

@ -147,7 +147,7 @@ void spfx_clear(void) {
static void spfx_destroy(SPFX* layer, int* nlayer, int spfx) { static void spfx_destroy(SPFX* layer, int* nlayer, int spfx) {
(*nlayer)--; (*nlayer)--;
memmove(&layer[spfx], &layer[spfx+1], (*nlayer-spfx-1)*sizeof(SPFX)); memmove(&layer[spfx], &layer[spfx+1], (*nlayer-spfx)*sizeof(SPFX));
} }
void spfx_update(const double dt) { void spfx_update(const double dt) {