ladevieq / dadengine

Yet another game engine project
MIT License
3 stars 0 forks source link

[FileReader] Reading a file into a string #3

Open ladevieq opened 5 years ago

ladevieq commented 5 years ago

When returning the size of text file, we must return the size plus one. Otherwise when using the function to allocate space, the string we not be null teminated.

Maybe we can do it differently ?

ladevieq commented 5 years ago

We must add one to the size of the file, this is not the job of the Size function to add one to the file size

ladevieq commented 5 years ago

The solution is not that good. When working with binary datam we can't this character at the end of a string.