From 5eaf2aca702f3fc817c58ca12149cffbb48b9805 Mon Sep 17 00:00:00 2001 From: LI Daobing Date: Mon, 26 Feb 2024 21:52:37 -0800 Subject: [PATCH] fix printf problem --- src/iptux/RevisePal.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/iptux/RevisePal.cpp b/src/iptux/RevisePal.cpp index caa135dd..06891a2c 100644 --- a/src/iptux/RevisePal.cpp +++ b/src/iptux/RevisePal.cpp @@ -265,8 +265,8 @@ void RevisePal::ApplyReviseData() { g_free(file); g_free(pal->iconfile); snprintf(path, MAX_PATHLEN, "%s" ICON_PATH "/%" PRIx32, - g_get_user_cache_dir(), pal->ipv4); - pal->iconfile = g_strdup_printf("%" PRIx32, pal->ipv4); + g_get_user_cache_dir(), ntohl(pal->ipv4.s_addr)); + pal->iconfile = g_strdup_printf("%" PRIx32, ntohl(pal->ipv4.s_addr)); gtk_tree_model_get(model, &iter, 0, &pixbuf, -1); gdk_pixbuf_save(pixbuf, path, "png", NULL, NULL); gtk_icon_theme_add_builtin_icon(pal->iconfile, MAX_ICONSIZE, pixbuf);