From 25d26b55e74b50a2fd0632329cb0bdca017fe8e6 Mon Sep 17 00:00:00 2001 From: Kanru Chen Date: Mon, 3 Dec 2007 12:46:45 +0000 Subject: [PATCH] Config: HAL: Fix XKB option parsing Actually combine the XKB options into a string, rather than just repeatedly writing a comma. (cherry picked from commit da893908feb2dcf7c22420b3426ab3ac65c7ca99) --- config/hal.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/hal.c b/config/hal.c index 6bb449d5a..4427deb39 100644 --- a/config/hal.c +++ b/config/hal.c @@ -134,10 +134,11 @@ get_prop_string_array(LibHalContext *hal_ctx, const char *udi, const char *prop) str = ret; for (i = 0; props[i]; i++) { - str = strcpy(str, props[i]); + strcpy(str, props[i]); + str += strlen(props[i]); *str++ = ','; } - *str = '\0'; + *(str-1) = '\0'; libhal_free_string_array(props); }