I am writing a code to save several strings to a StreamFile.
The strings are defined as (example):
to save to StreamFile I use:
I have also tried:
And both work, most of the time.
The problem is that some times the Length Byte is saved as zero (the string is correctly saved as checked with a Hex editor) and so when I read the string back to the variable "Title", I get an empty string.
Any idea why this is happening?