backport fix for bugs 1914, 1915. (from 2.0 branch commit 030181ff9f59). SDL-1.2
authorOzkan Sezer <sezeroz@gmail.com>
Sun, 07 Oct 2018 00:21:02 +0300
branchSDL-1.2
changeset 873d159f97ef3e7
parent 872 854ab2f1b51c
child 874 6a0b7356d763
backport fix for bugs 1914, 1915. (from 2.0 branch commit 030181ff9f59).
mixer.c
music.c
     1.1 --- a/mixer.c	Sun Oct 07 00:15:15 2018 +0300
     1.2 +++ b/mixer.c	Sun Oct 07 00:21:02 2018 +0300
     1.3 @@ -126,7 +126,7 @@
     1.4  
     1.5  static void add_chunk_decoder(const char *decoder)
     1.6  {
     1.7 -	void *ptr = SDL_realloc(chunk_decoders, (num_decoders + 1) * sizeof (const char **));
     1.8 +	void *ptr = SDL_realloc(chunk_decoders, (num_decoders + 1) * sizeof (const char *));
     1.9  	if (ptr == NULL) {
    1.10  		return;  /* oh well, go on without it. */
    1.11  	}
     2.1 --- a/music.c	Sun Oct 07 00:15:15 2018 +0300
     2.2 +++ b/music.c	Sun Oct 07 00:21:02 2018 +0300
     2.3 @@ -163,7 +163,7 @@
     2.4  
     2.5  static void add_music_decoder(const char *decoder)
     2.6  {
     2.7 -	void *ptr = SDL_realloc(music_decoders, (num_decoders + 1) * sizeof (const char **));
     2.8 +	void *ptr = SDL_realloc(music_decoders, (num_decoders + 1) * sizeof (const char *));
     2.9  	if (ptr == NULL) {
    2.10  		return;  /* oh well, go on without it. */
    2.11  	}