mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-05 05:18:40 +00:00
feed user-specified strings in cfg serialization/deserialization through escaping/unescaping path -- escape all double-quotes before serialization, de-escape when deserializing
This commit is contained in:
+4
-2
@@ -8378,10 +8378,12 @@ df_cfg_strings_from_gfx(Arena *arena, String8 root_path, DF_CfgSrc source)
|
||||
//- rjf: serialize fonts
|
||||
if(source == DF_CfgSrc_User)
|
||||
{
|
||||
String8 code_font_path_escaped = df_cfg_escaped_from_raw_string(arena, df_gfx_state->cfg_code_font_path);
|
||||
String8 main_font_path_escaped = df_cfg_escaped_from_raw_string(arena, df_gfx_state->cfg_main_font_path);
|
||||
str8_list_push(arena, &strs, str8_lit("/// fonts /////////////////////////////////////////////////////////////////////\n"));
|
||||
str8_list_push(arena, &strs, str8_lit("\n"));
|
||||
str8_list_pushf(arena, &strs, "code_font: \"%S\"\n", df_gfx_state->cfg_code_font_path);
|
||||
str8_list_pushf(arena, &strs, "main_font: \"%S\"\n", df_gfx_state->cfg_main_font_path);
|
||||
str8_list_pushf(arena, &strs, "code_font: \"%S\"\n", code_font_path_escaped);
|
||||
str8_list_pushf(arena, &strs, "main_font: \"%S\"\n", main_font_path_escaped);
|
||||
str8_list_push(arena, &strs, str8_lit("\n"));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user