From 412ba67abc1f2aba1341604857952853ff2f9819 Mon Sep 17 00:00:00 2001 From: frank <3737950+f34nk@users.noreply.github.com> Date: Mon, 26 Mar 2018 15:21:14 +0200 Subject: [PATCH] Cleaned formatting --- source/modest/finder/pseudo_class.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/modest/finder/pseudo_class.c b/source/modest/finder/pseudo_class.c index 977545f..07181c2 100644 --- a/source/modest/finder/pseudo_class.c +++ b/source/modest/finder/pseudo_class.c @@ -102,12 +102,14 @@ bool modest_finder_selector_sub_type_pseudo_class_function_contains(modest_finde if(sel_entry->key->data){ const char *str = sel_entry->key->data; int length = strlen(str) + 1; + char *new_data = mycore_realloc(data, length); if(new_data == NULL) { mycore_free(data); return false; } - snprintf(&new_data[0], length, "%s", str); + + snprintf(new_data, length, "%s", str); data = new_data; } @@ -118,11 +120,13 @@ bool modest_finder_selector_sub_type_pseudo_class_function_contains(modest_finde const char *whitespace = (prev > 0) ? " " : ""; const char *str = next->key->data; int length = strlen(whitespace) + strlen(str) + 1; + char *new_data = mycore_realloc(data, prev + length); if(new_data == NULL) { mycore_free(data); return false; } + snprintf(&new_data[prev], length, "%s%s", whitespace, str); data = new_data; }