diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2011-01-24 18:43:29 +0000 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2011-03-04 13:35:03 +0000 |
commit | 5d6396a11b3f58bed1bafa65737416220e89e09e (patch) | |
tree | 253731bbccd889a08a11b6431e02326e82bf7618 | |
parent | 8c69ae552e60b063257cee3b172a96e1cf9c3358 (diff) |
Cygwin/X: glxWinErrorMessage() formatting fixes
Fix the formatting of the output so it doesn't omit the last character of
the error message.
Don't report the error code twice for unknown errors.
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
-rw-r--r-- | hw/xwin/glx/indirect.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c index db051cd38..87270e2b5 100644 --- a/hw/xwin/glx/indirect.c +++ b/hw/xwin/glx/indirect.c @@ -231,13 +231,13 @@ const char *glxWinErrorMessage(void) sizeof(errorbuffer), NULL )) { - snprintf(errorbuffer, sizeof(errorbuffer), "Unknown error (%08x)", last_error); + snprintf(errorbuffer, sizeof(errorbuffer), "Unknown error", last_error); } if ((errorbuffer[strlen(errorbuffer)-1] == '\n') || (errorbuffer[strlen(errorbuffer)-1] == '\r')) errorbuffer[strlen(errorbuffer)-1] = 0; - sprintf(errorbuffer + strlen(errorbuffer) -1, " (%08x)", last_error); + sprintf(errorbuffer + strlen(errorbuffer), " (%08x)", last_error); return errorbuffer; } |