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 - strncmp with SDL_AUDIODRIVER?
Summary: strncmp with SDL_AUDIODRIVER?
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: audio (show other bugs)
Version: HG 1.2
Hardware: All All
: P2 trivial
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-30 20:45 UTC by Ryan C. Gordon
Modified: 2006-09-30 22:06 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 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.