Message from @why am I 𝓐𝓛𝓘𝓥𝓔
Discord ID: 473825958961479680
woah
there is something there
but why is that not reversed
if write() can display the reversed array fine
why cannot this
wait wait!
it is working!
but the file displayed is still corrupted chink runes
you have a null byte at the start
that might be a reason
because your input string is probably null terminated
that ends up at the start of the string
```
fwrite(mmappedData, 0, filesize, f);
```
if that second statement is zero, then nothing will printout
if it's one, it misses the first character, but is reversed, but is corrupted
well, the second argument is size isn't it
if you set it to 0 then it would indeed write fuck all
oh cool
this is great news
because now you've told fwrite that each of your items to write is 2 bytes long
when it is infact 1 byte long
indeed
and you're reading outside the bounds of your mmapped array
output is now 2x larger
which happens to be 0x0
changing your reverse array function should work
almost got it
bizzare
last tizen phonmem was last year
just an extra null at the beginning
yes
get rid of the null byte and it'll work probably
how would I do that whilst writing?
to skip the first byte?
dont do it while writing
do it before that