summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2011-01-24 18:43:29 +0000
committerJon TURNEY <jon.turney@dronecode.org.uk>2011-02-07 15:53:21 +0000
commit078e8368102dee7f5120b4a47c5db620712dcaca (patch)
tree195e51b8a9c7d2749ac08737ef7982e0dd57e6e1
parentd8653066a84960e9a6a9a4c52fc72fc1464a6965 (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>
-rwxr-xr-xhw/xwin/glx/indirect.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c
index 5c0900ee2..1c5a6d291 100755
--- 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;
}