From 965d5860ab35df3df586278dfba80fa89e30029a Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 14 Oct 2011 11:20:22 -0500 Subject: [PATCH] keyfile: fix reading intlist-like SSIDs (ie "101") (lp:874328) Intlists have to end with a ';' since that's how they are written out, and that's the only way we can actually distinguish between intlist SSIDs and string SSIDs, really. --- src/settings/plugins/keyfile/reader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/settings/plugins/keyfile/reader.c b/src/settings/plugins/keyfile/reader.c index f82050f393..9ca744e6aa 100644 --- a/src/settings/plugins/keyfile/reader.c +++ b/src/settings/plugins/keyfile/reader.c @@ -743,13 +743,13 @@ get_uchar_array (GKeyFile *keyfile, int i; /* New format: just a string - * Old format: integer list; e.g. 11;25;38 + * Old format: integer list; e.g. 11;25;38; */ tmp_string = g_key_file_get_string (keyfile, setting_name, key, NULL); if (tmp_string) { GRegex *regex; GMatchInfo *match_info; - const char *pattern = "^[[:space:]]*[[:digit:]]{1,3}[[:space:]]*(;[[:space:]]*[[:digit:]]{1,3}[[:space:]]*)*(;[[:space:]]*)?$"; + const char *pattern = "^[[:space:]]*[[:digit:]]{1,3};[[:space:]]*([[:space:]]*[[:digit:]]{1,3};[[:space:]]*)*([[:space:]]*)?$"; regex = g_regex_new (pattern, 0, 0, NULL); g_regex_match (regex, tmp_string, 0, &match_info);