Fix `rf` string-offsetting bug.
This commit is contained in:
parent
32a2254da9
commit
52c928846d
|
@ -458,7 +458,6 @@ char* readFileToString(FILE* input)
|
||||||
char* prev = string;
|
char* prev = string;
|
||||||
capacity *= 2;
|
capacity *= 2;
|
||||||
string = malloc(sizeof(char) * capacity);
|
string = malloc(sizeof(char) * capacity);
|
||||||
string += 1;
|
|
||||||
memcpy(string, prev, sizeof(char) * (capacity / 2));
|
memcpy(string, prev, sizeof(char) * (capacity / 2));
|
||||||
free(prev);
|
free(prev);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue