avoid additional "escape char eating" when rendering symbol texts (translate() + translate3() )

This commit is contained in:
stefan schippers 2025-08-22 00:08:22 +02:00
parent 3c65268de6
commit e64f76a4fd
1 changed files with 2 additions and 2 deletions

View File

@ -879,7 +879,7 @@ void draw_symbol(int what,int c, int n,int layer,short tmp_flip, short rot,
/* do another round of substitutions if some @var are found, but if not found leave @var as is */
dbg(1, "draw_symbol(): drawing string: str=%s prop=%s\n",
txtptr, text.prop_ptr ? text.prop_ptr : "<NULL>");
my_strdup2(_ALLOC_ID_, &txtptr, translate3(txtptr, 1, xctx->inst[n].prop_ptr,
my_strdup2(_ALLOC_ID_, &txtptr, translate3(txtptr, 0, xctx->inst[n].prop_ptr,
xctx->sym[xctx->inst[n].ptr].templ, NULL, NULL));
dbg(1, "draw_symbol(): after translate3: str=%s\n", txtptr);
draw_string(textlayer, what, txtptr,
@ -1049,7 +1049,7 @@ void draw_temp_symbol(int what, GC gc, int n,int layer,short tmp_flip, short rot
#endif
my_strdup2(_ALLOC_ID_, &txtptr, translate(n, text.txt_ptr));
/* do another round of substitutions if some @var are found, but if not found leave @var as is */
my_strdup2(_ALLOC_ID_, &txtptr, translate3(txtptr, 1, xctx->inst[n].prop_ptr,
my_strdup2(_ALLOC_ID_, &txtptr, translate3(txtptr, 0, xctx->inst[n].prop_ptr,
xctx->sym[xctx->inst[n].ptr].templ, NULL, NULL));
dbg(1, "draw_temp_symbol(): after translate3: str=%s\n", txtptr);
if(txtptr[0]) draw_temp_string(gc, what, txtptr,