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 4649 - two potential bugs in effect_position.c file
Summary: two potential bugs in effect_position.c file
Status: NEW
Alias: None
Product: SDL_mixer
Classification: Unclassified
Component: misc (show other bugs)
Version: 2.0.4
Hardware: x86 Windows 7
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-31 15:31 UTC by AltairPL
Modified: 2019-05-31 15:31 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description AltairPL 2019-05-31 15:31:31 UTC
1. all loops in _Eff_position_u8_c4() look like this:
    for (i = 0; i < len; i += sizeof (Uint8) * 6)
Shouldn't multiplier be 4 here (as in other _c4 functions)?

2. IMHO, angle adjustment in Mix_SetPosition() is incorrect, since passing -90 angle will simply change it to 90 instead of 270. I think it should be something like:
    angle %= 360;
    if (angle < 0) angle += 360;