mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-10-15 13:29:41 -07: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:
1 parent
1ade5e44fa
commit
3fd9014c20
3 files changed
+91
-15
No files matched your search
+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