[Fix] Stupid me, last commit I was checking for a prefix instead of suffix. :/

This commit is contained in:
Allanis 2013-07-11 16:01:55 +01:00
parent 4c1ee89ffb
commit 2d1040b703

View File

@ -238,10 +238,10 @@ int ai_init(void) {
/* Load the profiles. */ /* Load the profiles. */
for(i = 0; i < nfiles; i++) for(i = 0; i < nfiles; i++)
if((strncmp(files[i], AI_PREFIX, strlen(AI_PREFIX))==0) && /* prefixed. */ if((strncmp(files[i], AI_PREFIX, strlen(AI_PREFIX))==0) && /* Prefixed. */
(strncmp(files[i] + strlen(AI_PREFIX), AI_INCLUDE, /* Not an include. */ (strncmp(files[i] + strlen(AI_PREFIX), AI_INCLUDE, /* Not an include. */
strlen(AI_INCLUDE)) != 0) && strlen(AI_INCLUDE)) != 0) &&
(strncmp(files[i] + strlen(files[i]) - strlen(AI_PREFIX), /* Suffixed. */ (strncmp(files[i] + strlen(files[i]) - strlen(AI_SUFFIX), /* Suffixed. */
AI_SUFFIX, strlen(AI_SUFFIX))==0)) AI_SUFFIX, strlen(AI_SUFFIX))==0))
if(ai_loadProfile(files[i])) if(ai_loadProfile(files[i]))
WARN("Error loading AI profile '%s'", files[i]); WARN("Error loading AI profile '%s'", files[i]);