changeset 2784:03dd5a7bb410

Addl fix #323: Rating system https://github.com/BestImageViewer/geeqie/issues/323 g_ascii_string_to_unsigned() requires glib 2.54. The test set-up on Travis requires glib 2.40
author Colin Clark <colin.clark@cclark.uk>
date Tue, 26 Jun 2018 11:59:11 +0100
parents cb5b42c6d741
children 532fc301c5ba
files src/preferences.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/preferences.c	Mon Jun 25 10:19:46 2018 +0100
+++ b/src/preferences.c	Tue Jun 26 11:59:11 2018 +0100
@@ -1659,13 +1659,13 @@
 	hex_code = g_strsplit(hex_code_full, "+", 2);
 	if (hex_code[0] && hex_code[1])
 		{
-		g_ascii_string_to_unsigned(hex_code[1], 16, 0, 0x10FFFF, &hex_value, NULL);
+		hex_value = strtoull(hex_code[1], NULL, 16);
 		}
-	if (!hex_value)
+	if (!hex_value || hex_value > 0x10FFFF)
 		{
 		hex_value = 0x003F; // Unicode 'Question Mark'
 		}
-	str = g_string_append_unichar(str, hex_value);
+	str = g_string_append_unichar(str, (gunichar)hex_value);
 	gtk_label_set_text(g_list_nth_data(list, 1), str->str);
 
 	g_strfreev(hex_code);