Skip to main content

copy_ecstr

Function copy_ecstr 

Source
pub fn copy_ecstr(_table: &HashMap<u32, Vec<u8>>, p: &mut [u8])
Expand description

Port of copy_ecstr(Eccstr s, char *p) from Src/parse.c:537. Walks the BST and writes each entry to p[s->aoffs..] matching C’s recursive in-order traversal exactly. The old impl used the ECSTRS_REVERSE HashMap keyed by offs (= ecssub-relative wordcode-encoded offset), which collides across funcdef scopes: a string at relative offs=0 inside funcdef A and another at relative offs=0 inside funcdef B share the same key, so one overwrites the other.