Commit 63373b6d authored by Matthew Burket's avatar Matthew Burket
Browse files

Close the file the right way

parent bf8960c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ int main() {
        if (strlen(readBuff) > 0) {
            FILE *fp = fopen(HISTORY_FILE, "a+");
            write(fp->_fileno, readBuff, BUFFSIZE);
            close(fp);
            close(fp->_fileno);

        }
        // Remove the newline from fgets