diff options
author | Richard Hughes <richard@hughsie.com> | 2015-09-24 09:47:33 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2015-09-24 09:52:02 +0100 |
commit | daefcf13d36963bc77b09d7824d38f13dc5ba49b (patch) | |
tree | f2509e3f915951a4db7fb323972b8d9d723ee8e3 /libappstream-glib/as-release.c | |
parent | c14ea9def41aa41c2b6fd5f2eaf943dc3b5d459d (diff) | |
download | appstream-glib-daefcf13d36963bc77b09d7824d38f13dc5ba49b.tar.gz |
Always use a dotted-decimal representation of the version
This helps a lot for UEFI versions that just specify a uint32le number.
Diffstat (limited to 'libappstream-glib/as-release.c')
-rw-r--r-- | libappstream-glib/as-release.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/libappstream-glib/as-release.c b/libappstream-glib/as-release.c index 7946deb..bcb00f1 100644 --- a/libappstream-glib/as-release.c +++ b/libappstream-glib/as-release.c @@ -320,17 +320,7 @@ as_release_set_version (AsRelease *release, const gchar *version) { AsReleasePrivate *priv = GET_PRIVATE (release); g_free (priv->version); - - /* convert 0x prefixed strings to base 10 */ - if (g_str_has_prefix (version, "0x")) { - guint64 tmp; - tmp = g_ascii_strtoull (version + 2, NULL, 16); - priv->version = g_strdup_printf ("%" G_GUINT64_FORMAT, tmp); - return; - } - - /* no special rule */ - priv->version = g_strdup (version); + priv->version = as_utils_version_parse (version); } /** |