From: longpanda Date: Thu, 17 Feb 2022 12:06:18 +0000 (+0800) Subject: Fix a bug when creating multi-mod configuration for img_list in VentoyPlugson. X-Git-Tag: v1.0.70~6 X-Git-Url: https://glassweightruler.freedombox.rocks/gitweb/Ventoy.git/commitdiff_plain/43e921878b27d1b293819ed9dc4ea2b87b28ae58?ds=inline Fix a bug when creating multi-mod configuration for img_list in VentoyPlugson. --- diff --git a/Plugson/src/Web/ventoy_http.c b/Plugson/src/Web/ventoy_http.c index be24e37..9907e6d 100644 --- a/Plugson/src/Web/ventoy_http.c +++ b/Plugson/src/Web/ventoy_http.c @@ -1775,7 +1775,9 @@ int ventoy_data_cmp_image_list(data_image_list *data1, data_image_list *data2) int ventoy_data_save_image_list(data_image_list *data, const char *title, char *buf, int buflen) { int pos = 0; + int prelen; path_node *node = NULL; + char newtitle[64]; (void)title; @@ -1783,17 +1785,20 @@ int ventoy_data_save_image_list(data_image_list *data, const char *title, char * { return 0; } - + + prelen = (int)strlen("image_list"); + VTOY_JSON_FMT_BEGIN(pos, buf, buflen); if (data->type == 0) { - VTOY_JSON_FMT_KEY_L(L1, "image_list"); + scnprintf(newtitle, sizeof(newtitle), "image_list%s", title + prelen); } else { - VTOY_JSON_FMT_KEY_L(L1, "image_blacklist"); + scnprintf(newtitle, sizeof(newtitle), "image_blacklist%s", title + prelen); } + VTOY_JSON_FMT_KEY_L(L1, newtitle); VTOY_JSON_FMT_ARY_BEGIN_N(); diff --git a/Plugson/vs/VentoyPlugson/Release/VentoyPlugson.exe b/Plugson/vs/VentoyPlugson/Release/VentoyPlugson.exe index 930dd29..5736988 100644 Binary files a/Plugson/vs/VentoyPlugson/Release/VentoyPlugson.exe and b/Plugson/vs/VentoyPlugson/Release/VentoyPlugson.exe differ diff --git a/Plugson/www/helplist b/Plugson/www/helplist index 3cd79e6..4948aa3 100644 --- a/Plugson/www/helplist +++ b/Plugson/www/helplist @@ -1 +1 @@ -de_DEen_USfr_FRhr_HRid_IDja_JPpt_PTsr_CYsr_SRtr_TRzh_CN \ No newline at end of file +de_DEen_USfr_FRhr_HRid_IDja_JPpt_PTsr_RStr_TRzh_CN \ No newline at end of file diff --git a/Plugson/www/plugson_menu_tip.html b/Plugson/www/plugson_menu_tip.html index b68ef4e..4b12cd8 100644 --- a/Plugson/www/plugson_menu_tip.html +++ b/Plugson/www/plugson_menu_tip.html @@ -195,7 +195,7 @@ $('input:text[id=id_tip_text_top]').val(data.top); $('input:text[id=id_tip_text_color]').val(data.color); - FillTipTable(data.tips); + FillTipTable(data); }