Skip to content

Commit

Permalink
Fixed bug #809
Browse files Browse the repository at this point in the history
 O.Sezer      2009-09-26 04:38:45 PDT

the filename argument of native_midi_loadsong() should be const char*, the attached patch does that and also removes the unnecessary char* cast in music.c where native_midi_loadsong() is called.
  • Loading branch information
slouken committed Sep 26, 2009
1 parent 079e34d commit a93f52f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion music.c
Expand Up @@ -627,7 +627,7 @@ Mix_Music *Mix_LoadMUS(const char *file)
music->type = MUS_MID;
#ifdef USE_NATIVE_MIDI
if ( native_midi_ok ) {
music->data.nativemidi = native_midi_loadsong((char *)file);
music->data.nativemidi = native_midi_loadsong(file);
if ( music->data.nativemidi == NULL ) {
Mix_SetError("%s", native_midi_error());
music->error = 1;
Expand Down
2 changes: 1 addition & 1 deletion native_midi/native_midi.h
Expand Up @@ -28,7 +28,7 @@
typedef struct _NativeMidiSong NativeMidiSong;

int native_midi_detect();
NativeMidiSong *native_midi_loadsong(char *midifile);
NativeMidiSong *native_midi_loadsong(const char *midifile);
NativeMidiSong *native_midi_loadsong_RW(SDL_RWops *rw);
void native_midi_freesong(NativeMidiSong *song);
void native_midi_start(NativeMidiSong *song);
Expand Down
2 changes: 1 addition & 1 deletion native_midi/native_midi_mac.c
Expand Up @@ -89,7 +89,7 @@ int native_midi_detect()
return 1;
}

NativeMidiSong *native_midi_loadsong(char *midifile)
NativeMidiSong *native_midi_loadsong(const char *midifile)
{
NativeMidiSong *song = NULL;
MIDIEvent *evntlist = NULL;
Expand Down
2 changes: 1 addition & 1 deletion native_midi/native_midi_win32.c
Expand Up @@ -188,7 +188,7 @@ int native_midi_detect()
return 1;
}

NativeMidiSong *native_midi_loadsong(char *midifile)
NativeMidiSong *native_midi_loadsong(const char *midifile)
{
NativeMidiSong *newsong;
MIDIEvent *evntlist = NULL;
Expand Down
2 changes: 1 addition & 1 deletion native_midi_gpl/native_midi_gpl.c
Expand Up @@ -127,7 +127,7 @@ int native_midi_detect()
return ret;
}

NativeMidiSong *native_midi_loadsong(char *midifile)
NativeMidiSong *native_midi_loadsong(const char *midifile)
{
NativeMidiSong *song = NULL;
char *extra;
Expand Down

0 comments on commit a93f52f

Please sign in to comment.