Turing-Complete now

This commit is contained in:
vegowotenks 2024-10-02 15:42:06 +02:00
parent 3bf4a73c2e
commit 9dbb9e882c
6 changed files with 405 additions and 30 deletions

View file

@ -64,9 +64,9 @@ char* load_file_string(StringView path)
return NULL;
}
size_t bytes_read = fread(buffer, 1, length + 1, stream);
if (bytes_read != length) {
fprintf(stderr, "Fatal Error: Failed read %li bytes from script file, got only %li\n", length, bytes_read);
size_t objects_read = fread(buffer, length, 1, stream);
if (objects_read != 1) {
fprintf(stderr, "Fatal Error: Failed read %li bytes from script file, got only %li\n", length, objects_read);
free(buffer);
return NULL;
}