Commit 639d9b61 authored by Carlos Garnacho's avatar Carlos Garnacho

libtracker-common: Fix code flow in tracker_unescape_unichars()

There was a second if() hidden in the block, meant to be a "else if".
Also drop the continues, since there's not much code afterwards in
the loop.
parent dfaa5e39
......@@ -303,20 +303,18 @@ tracker_unescape_unichars (const gchar *str,
g_string_append_c (copy, str[i]);
g_string_append_c (copy, str[i + 1]);
i += 2;
} if (len - i >= 6 &&
} else if (len - i >= 6 &&
strncmp (&str[i], "\\u", 2) == 0 &&
range_is_xdigit (&str[i], 2, 6)) {
ch = xdigit_to_unichar (&str[i], 2, 6);
g_string_append_unichar (copy, ch);
i += 6;
continue;
} else if (len - i >= 10 &&
strncmp (&str[i], "\\U", 2) == 0 &&
range_is_xdigit (&str[i], 2, 10)) {
ch = xdigit_to_unichar (&str[i], 2, 10);
g_string_append_unichar (copy, ch);
i += 10;
continue;
} else {
g_string_append_c (copy, str[i]);
i++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment