| Summary: | Logging on Windows doesn't attach to console properly | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Sik <sik.the.hedgehog> |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | Windows (All) | ||
Argh forget it, just realized I misread the line (why do I realize *only* when I click send when I looked at the code for like an hour? argh) Nevermind. |
Found first on SDL 2.0.3-9008 and verified on 2.0.4-9174. When SDL_LogOutput tries to attach itself to the console, it checks the return value of AttachConsole. The problem is that it checks for true as failure, when the function returns false as failure instead. Suggested fix would be to change this line (335 of SDL_log.c in 2.0.4-9174): if (!attachResult) { With this (just removed the ! essentially): if (attachResult) { Would be nice if somebody can verify this first (I found the error in the code but I haven't been able to test it yet).