Closed SimonMossmyr closed 4 years ago
You are printing the garbage behind the buffer. You need to make the buffer one byte larger and add a zero-terminator at the end of the read contents before using cout.
listfile_buffer[number_of_chars_actually_read] = 0;
Sample code:
Compile:
Output (using (8)GoldRush.w3x):
The last line, i.e. @V and FV, is different on every run. And shouldn't be there.
Using StormLib-9.22 on Ubuntu 19.04.