We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1765

Summary: Division by 0 error in case of quick fade-in fade-out
Product: SDL_mixer Reporter: András Eisenberger <csirkeee>
Component: miscAssignee: Ryan C. Gordon <icculus>
Status: NEW --- QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: sezeroz
Version: 1.2.12   
Hardware: x86   
OS: Windows 7   

Description András Eisenberger 2013-03-20 17:00:23 UTC
Steps to reproduce:

1) Call Mix_FadeInMusic with ms smaller then ms_per_step (in my case on windows, ms was 50, ms_per_step was 249), which makes music->fade_steps = 0.
2) Call Mix_FadeOutMusic before the next step happens, that will use this 0 as old_fade_steps in a division.

Result: crash.