[SDL] some trivial bugs
Ryan C. Gordon
icculus at icculus.org
Wed Nov 29 02:50:38 PST 2006
> My environment is win2000 and VC8 Express Edition.
> I don't know why,
> but the compiler reports a link error,
> "unresolved external symbol __allshr referenced in function ・・・".
Hmm...that's odd that it would want to call a built-in function for
bitshifting, even with a 64-bit value...this is probably fixable with
the right compiler flag, but it's easier to just make them divides.
Fixed in svn revision #2921.
> This is also storange to me,
> but it fails in the link of strcmp.
We don't link to the Microsoft C runtime on Windows, instead supplying
our own functions...this was largely due to problems caused by linking
an SDL library built with one C runtime to an application built with a
different one. Using SDL_strcmp() does the correct thing.
Fixed in svn revision #2918.
> - if (r < 255 | g < 255 | b < 255) {
> + if (r < 255 || g < 255 || b < 255) {
Whoops, good catch. Fixed in svn revision #2917.
> -#define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*count)
> +#define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*(count))
Ah, macros.
Fixed in svn revision #2919 for the 1.2 branch, and #2920 for the 1.3
branch.
I should probably tell you that you should use the 1.2 branch and not
1.3 at this time unless you are explicitly experimenting with 1.3... 1.2
is the stable branch at the moment...thank you for the patches, either way.
--ryan.
More information about the SDL
mailing list