[gnome-software] trivial: Record the sort key in hex
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Record the sort key in hex
- Date: Wed, 24 Feb 2016 17:52:26 +0000 (UTC)
commit cabddc1fec3b9a7b434620fb38366e2e5e5d5f2d
Author: Richard Hughes <richard hughsie com>
Date: Wed Feb 24 17:46:34 2016 +0000
trivial: Record the sort key in hex
The actual base does not matter, but doing this in hex makes it easy to spot
values from new versions of appstream-glib which return a bitfield.
src/gs-app.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index 77c2e89..99cd994 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -2180,11 +2180,11 @@ gs_app_subsume (GsApp *app, GsApp *other)
void
gs_app_set_search_sort_key (GsApp *app, guint match_value)
{
- gchar md_value[4];
+ gchar md_value[6];
g_return_if_fail (GS_IS_APP (app));
- g_snprintf (md_value, 4, "%03i", match_value);
+ g_snprintf (md_value, sizeof(md_value), "%05x", match_value);
gs_app_set_metadata (app, "SearchMatch", md_value);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]