summaryrefslogtreecommitdiff
path: root/gramscii.c
diff options
context:
space:
mode:
Diffstat (limited to 'gramscii.c')
-rw-r--r--gramscii.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gramscii.c b/gramscii.c
index 24841f3..f7f2ed4 100644
--- a/gramscii.c
+++ b/gramscii.c
@@ -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;
}