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 334

Summary: strncmp with SDL_AUDIODRIVER?
Product: SDL Reporter: Ryan C. Gordon <icculus>
Component: audioAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: trivial    
Priority: P2    
Version: HG 1.2   
Hardware: All   
OS: All   

Description Ryan C. Gordon 2006-09-30 20:45:06 UTC
In src/audio/SDL_audio.c, SDL_AudioInit(), we do this:

   if (SDL_strncmp(bootstrap[i]->name, driver_name,
                   SDL_strlen(bootstrap[i]->name)) == 0) {


Is there any reason for the 'n' version of strcmp()? Is there a case where we'd want to accept "SDL_AUDIODRIVER=directx92u3-jf-2p9"?

--ryan.
Comment 1 Sam Lantinga 2006-09-30 21:27:56 UTC
Nope, it should probably be strcasecmp
Comment 2 Ryan C. Gordon 2006-09-30 22:06:42 UTC
Ah, the 1.2 branch looks like it had some sort of "SDL_AUDIODRIVER=driver:3" syntax at one point, which explains the strncmp().

Anyhow, fixed in svn revision #2799 and #2800.

--ryan.