Browse Source

fix a bug in the ={par({...})} function.

The replacement did not happen correctly.
pre-master-46
Holger Vogt 2 years ago
parent
commit
e561249e9b
  1. 8
      src/frontend/inpcom.c

8
src/frontend/inpcom.c

@ -6596,11 +6596,13 @@ static void inp_compat(struct card *card)
// skip '=' // skip '='
cut_line++; cut_line++;
// copy the replacement without trailing '\0' // copy the replacement without trailing '\0'
for (ii = 0; ii < xlen; ii++)
char* loc_ptr = str_ptr - 1;
for (ii = 0; ii < xlen; ii++) {
if (*copy_ptr) if (*copy_ptr)
*cut_line++ = *copy_ptr++;
*loc_ptr++ = *copy_ptr++;
else else
*cut_line++ = ' ';
*loc_ptr++ = ' ';
}
tfree(del_ptr); tfree(del_ptr);
tfree(exp_ptr); tfree(exp_ptr);

Loading…
Cancel
Save