I hate my life
This commit is contained in:
@ -47,4 +47,12 @@ void fileMkdirp(char *path) {
|
||||
buffer[i] = '\0';
|
||||
_mkdir(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
void assetReadString(FILE *file, char *buffer) {
|
||||
size_t length;
|
||||
fseek(file, 0, SEEK_END);// Seek to the end
|
||||
length = ftell(file);// Get our current position (the end)
|
||||
fseek(file, 0, SEEK_SET);// Reset the seek
|
||||
fread(buffer, 1, length, file);// Read all the bytes
|
||||
}
|
Reference in New Issue
Block a user