]> glassweightruler.freedombox.rocks Git - Ventoy.git/commitdiff
Fix a bug when creating multi-mod configuration for img_list in VentoyPlugson.
authorlongpanda <admin@ventoy.net>
Thu, 17 Feb 2022 12:06:18 +0000 (20:06 +0800)
committerlongpanda <admin@ventoy.net>
Thu, 17 Feb 2022 12:06:18 +0000 (20:06 +0800)
Plugson/src/Web/ventoy_http.c
Plugson/vs/VentoyPlugson/Release/VentoyPlugson.exe
Plugson/www/helplist
Plugson/www/plugson_menu_tip.html

index be24e3755f5397997d00b7d58c5d83c4edd7d11b..9907e6da7e248df1897d6bff40fc3557e7e70bfc 100644 (file)
@@ -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 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;
     path_node *node = NULL;
+    char newtitle[64];
 
     (void)title;
 
 
     (void)title;
 
@@ -1783,17 +1785,20 @@ int ventoy_data_save_image_list(data_image_list *data, const char *title, char *
     {
         return 0;
     }
     {
         return 0;
     }
-    
+
+    prelen = (int)strlen("image_list");
+
     VTOY_JSON_FMT_BEGIN(pos, buf, buflen);
 
     if (data->type == 0)
     {
     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
     {
     }
     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();
 
     
     VTOY_JSON_FMT_ARY_BEGIN_N();
 
index 930dd2908d1ce77e0d6fb9ec54c2b5a3800db8d4..5736988ab8870edfa49b45a30f7741581b9b17a3 100644 (file)
Binary files a/Plugson/vs/VentoyPlugson/Release/VentoyPlugson.exe and b/Plugson/vs/VentoyPlugson/Release/VentoyPlugson.exe differ
index 3cd79e60e4a93b2151a6b7a8894a021a6ac88570..4948aa3e20e42a98489b912d41dfd93e8d018a43 100644 (file)
@@ -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
index b68ef4eafe71d8c15a9fa6c0ac0a06f6e3454dc5..4b12cd8dcdab85117386a8a1e66dac8385269879 100644 (file)
     $('input:text[id=id_tip_text_top]').val(data.top);\r
     $('input:text[id=id_tip_text_color]').val(data.color);\r
 \r
     $('input:text[id=id_tip_text_top]').val(data.top);\r
     $('input:text[id=id_tip_text_color]').val(data.color);\r
 \r
-    FillTipTable(data.tips);\r
+    FillTipTable(data);\r
   }\r
 \r
 \r
   }\r
 \r
 \r