| Summary: | SDL_WINDOWID envvar no longer accepts hex values | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Kyle J. Harms <kyle.j.harms> |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | minor | ||
| Priority: | P2 | ||
| Version: | 1.2.10 | ||
| Hardware: | x86 | ||
| OS: | Windows (XP) | ||
This is fixed in subversion, thanks! |
In previous versions of SDL the SDL_WINDOWID environment variable would accept a value in decimal or in hex (prefixed by 0x). However 1.2.10 does not accept values in hexidecimal. An easy fix is to change the SDL_strtoull function in stdlib/sdl_string.c to understand the 0x prefix. #ifndef HAVE_STRTOULL Uint64 SDL_strtoull(const char *string, char **endp, int base) { size_t len; Uint64 value; // Check for base 16 if ( !base ) { if ( (strlen(string) > 2) && (strncmp(string, "0x", 2) == 0) ) { base = 16; } else { base = 10; } } len = SDL_ScanUnsignedLongLong(string, base, &value); if ( endp ) { *endp = (char *)string + len; } return value; }