mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2025-02-20 15:14:26 +01:00
Resize the string in Directory::read_file().
This commit is contained in:
parent
ed9b23ad86
commit
269de98d22
@ -122,6 +122,8 @@ String Directory::read_file(const String &path) {
|
||||
long fsize = ftell(f);
|
||||
fseek(f, 0, SEEK_SET); /* same as rewind(f); */
|
||||
|
||||
fd.resize(fsize);
|
||||
|
||||
fread(fd.dataw(), 1, fsize, f);
|
||||
fclose(f);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user