From 3cefe9f9b5a3b328f20bf241c72041b1bc0e5100 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Sat, 11 Sep 2021 10:30:31 +1000 Subject: [PATCH] [client] config: window width & height are unsigned values --- client/src/config.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/config.c b/client/src/config.c index 8064f4e8..78b051ef 100644 --- a/client/src/config.c +++ b/client/src/config.c @@ -751,7 +751,7 @@ static bool optSizeParse(struct Option * opt, const char * str) if (!str) return false; - if (sscanf(str, "%dx%d", &g_params.w, &g_params.h) == 2) + if (sscanf(str, "%ux%u", &g_params.w, &g_params.h) == 2) { if (g_params.w < 1 || g_params.h < 1) return false; @@ -770,9 +770,9 @@ static StringList optSizeValues(struct Option * opt) static char * optSizeToString(struct Option * opt) { - int len = snprintf(NULL, 0, "%dx%d", g_params.w, g_params.h); + int len = snprintf(NULL, 0, "%ux%u", g_params.w, g_params.h); char * str = malloc(len + 1); - sprintf(str, "%dx%d", g_params.w, g_params.h); + sprintf(str, "%ux%u", g_params.w, g_params.h); return str; }