Setup the assembler to use the new file reading code.
This commit is contained in:
+3
-4
@@ -5,16 +5,15 @@
|
||||
int ReadAllString(const char* path, char** content_ptr, size_t* bytes_read) {
|
||||
if (!path || !content_ptr || !bytes_read) return 0;
|
||||
|
||||
FILE *file;
|
||||
file = fopen(path, "rb");
|
||||
FILE *file = fopen(path, "rb");
|
||||
|
||||
if (!file) {
|
||||
fprintf(stderr, "Failed to open '%s'. %s.\n", path, strerror(errno));
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *content = NULL, *temp;
|
||||
size_t used, capacity, read;
|
||||
char *content = NULL, *temp = NULL;
|
||||
size_t used = 0, capacity = 0, read = 0;
|
||||
|
||||
while(1) {
|
||||
if (used + FUTIL_READ_SIZE + 1 > capacity) {
|
||||
|
||||
Reference in New Issue
Block a user