EnableExplicit
Define text1.s=~"Hällo Welt #@€ß\nHöLLo Würldz"
Define size=StringByteLength(text1)
Define *mem=AllocateMemory(size)
CopyMemoryString(text1,@*mem):*mem-size
Define *res1=AllocateMemory(size) ; Here it dies
Win10 x64 21H1
Last edited by Cyllceaux on Wed Jul 28, 2021 6:06 am, edited 1 time in total.
I can't test it here, but the *mem-Buffer is to small, StringByteLength return the length without the zero-end-byte, CopyMemoryString DOES copy the zero-byte. You should add a "SizeOf(Character)".