diff options
Diffstat (limited to 'gramscii.c')
-rw-r--r-- | gramscii.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -633,7 +633,7 @@ void write_file(){ if (!fname[0] || force_new){ get_string("Write to: ", fname, 255); - if (f=fopen(fname, "r")){ + if ((f=fopen(fname, "r"))!=NULL){ if (!is_yes(get_key("File exists. Overwrite [y/n]?")) ){ fclose(f); return; @@ -851,4 +851,5 @@ int main(int argc, char *argv[]){ commands(); cleanup(0); + return 0; } |