Re: [AD] SF.net SVN: alleg:[13158] allegro/branches/4.9/src/opengl/extensions.c |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Coordination of admins/developers of the game programming library Allegro <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] SF.net SVN: alleg:[13158] allegro/branches/4.9/src/opengl/extensions.c
- From: Evert Glebbeek <eglebbk@xxxxxxxxxx>
- Date: Tue, 30 Mar 2010 14:58:47 -0400
On 30 Mar 2010, at 14:46 , mmimica@xxxxxxxxxx wrote:
> + for (major = 9; major > 0; major--) {
> + for (minor1 = 9; minor1 >= 0; minor1--) {
> + for (minor2 = 9; minor2 >= 0; minor2--) {
> + sprintf(ver, "%i.%i.%i", major, minor1, minor2);
> + if (strncmp(str, ver, 5) == 0) {
Yuck.
What's wrong with sscanf()?
Say,
major = minor1 = minor2 = 0;
sscanf(ver, "%d.%d.%d", &major, &minor1, &minor2);
?
I don't know the answer to this question, but can OpenGL version numbers have more than one digit, or do they guarantee that that never happens?
Evert