[Fix] Fixed segfaults with new ai system.

This commit is contained in:
Allanis 2013-12-28 22:50:48 +00:00
parent 89b297887c
commit 75e438a98f

View File

@ -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;