(main|file-handler)~fixed some stuff

Big bug with file handler: I can write data well, but reading it
causes some trace error which I cannot be bothered to fix.  So I'll
just work on making the step function way more efficient.
This commit is contained in:
2023-08-25 20:03:23 +01:00
parent 58970e8a68
commit 21c03264e6
2 changed files with 43 additions and 7 deletions

7
main.c
View File

@@ -116,9 +116,12 @@ int main(void)
}
if (state.thread_alive)
pthread_cancel(step_thread);
{
state.thread_alive = false;
pthread_join(step_thread, NULL);
}
write_to_file(&state, "data.out");
CloseWindow();
free(state.data);
return 0;
}