Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool load(FILE* file, BYTE** content, size_t* length)
- {
- char* fileBytes = malloc(sizeof(char));
- unsigned long counter = 0;
- uint8_t buffer[BYTES];
- while( fread(&buffer, 1, 1, file)== 1)
- {
- fileBytes[counter] = buffer[counter];
- *content = &fileBytes[0];
- counter++;
- length = &counter;
- }
- free(fileBytes);
- return true;
- }
Advertisement
Add Comment
Please, Sign In to add comment