| Summary: | SDLNet_Read fails when passing a const pointer | ||
|---|---|---|---|
| Product: | SDL_net | Reporter: | Felix Geyer <debfx> |
| Component: | misc | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 1.2.8 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
Fixed, thanks! http://hg.libsdl.org/SDL_net/rev/fbd60945674e |
SDLNet_Read16 and SDLNet_Read32 fail when passing a const pointer: > error: reinterpret_cast from type 'const char*' to type 'Uint32* {aka unsigned int*}' casts away qualifiers The actual SDLNet_Read* functions are only defined for "void *" but the macros previously allowed passing const pointers as they used c-style casts. This can probably be fixed by casting to "const Uint16 *" / "const Uint32 *".