[Fix] Fixed segfaults with new ai system.
This commit is contained in:
parent
89b297887c
commit
75e438a98f
2
src/ai.c
2
src/ai.c
@ -310,8 +310,8 @@ int ai_pinit(Pilot* p, char* ai) {
|
|||||||
else
|
else
|
||||||
param[i-n] = ai[i];
|
param[i-n] = ai[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
if(n != 0) param[i-n] = '\0'; /* Terminate string if needed. */
|
if(n != 0) param[i-n] = '\0'; /* Terminate string if needed. */
|
||||||
|
else buf[i] = '\0';
|
||||||
|
|
||||||
prof = ai_getProfile(buf);
|
prof = ai_getProfile(buf);
|
||||||
p->ai = prof;
|
p->ai = prof;
|
||||||
|
Loading…
Reference in New Issue
Block a user