[tracker: 1/3] fix for the issue #280




commit dc2362265f24f33be30c1507f83793538065da9e
Author: nis130 <nishitlimbani130 gmail com>
Date:   Fri Jan 22 18:43:30 2021 +0530

    fix for the issue #280

 src/libtracker-fts/tracker-fts-tokenizer.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-fts/tracker-fts-tokenizer.c b/src/libtracker-fts/tracker-fts-tokenizer.c
index cfbedfb69..5da19ee01 100644
--- a/src/libtracker-fts/tracker-fts-tokenizer.c
+++ b/src/libtracker-fts/tracker-fts-tokenizer.c
@@ -248,9 +248,11 @@ tracker_offsets_function (const Fts5ExtensionApi  *api,
                if (str->len != 0)
                        g_string_append_c (str, ',');
 
-               g_string_append_printf (str, "%s,%d",
-                                       data->property_names[col],
-                                       g_array_index (offsets, gint, n_token));
+               if(offsets->len != 0) {
+                   g_string_append_printf (str, "%s,%d",
+                                           data->property_names[col],
+                                           g_array_index (offsets, gint, n_token));
+               }
        }
 
        if (offsets)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]