I've finally cleaned out all my obvious bugs except this one. When I try to write to a w+ file, the file is overwritten with... nothing. I.e., the file is successfully opened and the string to be written contains printable characters (I checked with printf), but nothing is actually sent to the file.
Here's the function that tries to write, which is also the one I checked the string in.Is there any other code that might hold a clue, or am I doing something blatantly wrong in those three lines? Thanks!Code:void outline_write(struct outline *this, FILE *file){ char *text = outline_item_toString(this->root, 0); fprintf(file, "%s", text); free(text); }