flat assembler
Message board for the users of flat assembler.
Index
> Main > realloc not work |
Author |
|
AsmGuru62 21 May 2023, 23:25
It looks like AssignText macro is just erasing allocated pointers.
Maybe, what you want is to COPY the strings into allocated blocks of memory? If realloc function detects a 'bad' pointer in the chain of blocks -- it may fail. I did not run your code in debugger, but here is how I would make the AssignText macro: Code: macro AssignText buffer, source mov rdi, [buffer] mov rsi, source @@: movsb test al, al jnz @r end macro |
|||
21 May 2023, 23:25 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.