Cleanup
This commit is contained in:
@@ -59,6 +59,7 @@ char *load_file(const char *path, uint32_t *out_len, bool *out_eol) {
|
||||
bool has_utf8_bom = (bom[0] == 0xEF && bom[1] == 0xBB && bom[2] == 0xBF);
|
||||
uint32_t skip = has_utf8_bom ? 3 : 0;
|
||||
uint32_t data_len = static_cast<uint32_t>(len) - skip;
|
||||
file.clear();
|
||||
file.seekg(skip, std::ios::beg);
|
||||
char *buf = (char *)malloc(data_len + 1);
|
||||
if (!buf)
|
||||
|
||||
Reference in New Issue
Block a user