diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c
index ed979eea5890b37d748368251560603577c41ef0..c4b2f98f4d73dbbe85df4f0ef7933568cc7fcbd2 100644
--- a/src/sdl/mixer_sound.c
+++ b/src/sdl/mixer_sound.c
@@ -878,10 +878,11 @@ boolean I_SetSongSpeed(float speed)
 #ifdef HAVE_OPENMPT
 	if (openmpt_mhandle)
 	{
+		char modspd[13];
+
 		if (speed > 4.0f)
 			speed = 4.0f; // Limit this to 4x to prevent crashing, stupid fix but... ~SteelT 27/9/19
 
-		char modspd[8];
 		sprintf(modspd, "%g", speed);
 		openmpt_module_ctl_set(openmpt_mhandle, "play.tempo_factor", modspd);
 		return true;