[Fix] Woops. .wav sounds not loading into memory propperly.

This commit is contained in:
Allanis 2013-02-23 00:19:51 +00:00
parent 999bdc7c8a
commit 04014d4e9a

View File

@ -164,7 +164,7 @@ static int sound_makeList(void) {
sound_list = realloc(sound_list, ++nsound_list * sizeof(alSound)); sound_list = realloc(sound_list, ++nsound_list * sizeof(alSound));
// Remove the prefix and suffix. // Remove the prefix and suffix.
len = strlen(files[i]) - strlen(SOUND_SUFFIX SOUND_SUFFIX); len = strlen(files[i]) - strlen(SOUND_SUFFIX SOUND_PREFIX);
strncpy(tmp, files[i] + strlen(SOUND_PREFIX), len); strncpy(tmp, files[i] + strlen(SOUND_PREFIX), len);
tmp[len] = '\0'; tmp[len] = '\0';