embed formatting is "weird" #5

Closed
opened 2024-02-20 19:33:43 +01:00 by MarieEckert · 3 comments
MarieEckert commented 2024-02-20 19:33:43 +01:00 (Migrated from github.com)

input:

sector embedding_test
  section sect1
    str foo 'bar'
    u16 someu16 1337

    str local_embed_test '$(foo)'
  end
end
sector list_src
  section sect1
    list str somelist 'aasd', 'bebis', '$(/embedding_test/sect1/someu16)'
  end
end
sector test
  section sectneg1
    i16 test -200
  end

  section sect1
    u8 test 200
    str dest 'foo $(/embedding_test/sect1/foo) with someu16
    $(/embedding_test/sect1/someu16) this should appear normal -> \$(aa) ''
    <$(/list_src/sect1/somelist)> a
    $(/bogus/field) $(test) $(sectneg1/test)
  '
  end
end

when formatting /test/sect1/dest with pathrel /test/sect1 the output is broken:

foo bar with someu16
    1337 this should appear normal -> $(aa) '
    <1/someu16) this should appear normal -> \$(aa) '
    <aasd> <bebis> <1337> a
    (nullptr) 200 -200

the 3rd line should not exist

input: ```mcfg_2 sector embedding_test section sect1 str foo 'bar' u16 someu16 1337 str local_embed_test '$(foo)' end end sector list_src section sect1 list str somelist 'aasd', 'bebis', '$(/embedding_test/sect1/someu16)' end end sector test section sectneg1 i16 test -200 end section sect1 u8 test 200 str dest 'foo $(/embedding_test/sect1/foo) with someu16 $(/embedding_test/sect1/someu16) this should appear normal -> \$(aa) '' <$(/list_src/sect1/somelist)> a $(/bogus/field) $(test) $(sectneg1/test) ' end end ``` when formatting `/test/sect1/dest` with pathrel `/test/sect1` the output is broken: ``` foo bar with someu16 1337 this should appear normal -> $(aa) ' <1/someu16) this should appear normal -> \$(aa) ' <aasd> <bebis> <1337> a (nullptr) 200 -200 ``` the 3rd line should not exist
MarieEckert commented 2024-02-22 14:01:36 +01:00 (Migrated from github.com)

it seems that is caused by the "wix" (write index) not being incremented correctly within the formatting function. This is possibly rooted in some deeper fuckup

it seems that is caused by the "wix" (write index) not being incremented correctly within the formatting function. This is possibly rooted in some deeper fuckup
MarieEckert commented 2024-02-24 19:14:22 +01:00 (Migrated from github.com)

The fuckup is not appended using _append_char or _append_str in mcfg_util.c

The fuckup is not appended using _append_char or _append_str in mcfg_util.c
MarieEckert commented 2024-05-26 23:46:49 +02:00 (Migrated from github.com)

embed formatting is now being rewritten on branch topic/field_embeds_rewrite

embed formatting is now being rewritten on branch topic/field_embeds_rewrite
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
marie/mcfg_2#5
No description provided.