summaryrefslogtreecommitdiff
path: root/gramscii.c
diff options
context:
space:
mode:
authorKatolaZ <katolaz@freaknet.org>2019-07-23 16:57:25 +0100
committerKatolaZ <katolaz@freaknet.org>2019-07-23 16:57:25 +0100
commit3a8eeffc5b3ef3d23984913d841e3a0aa5f68e16 (patch)
tree9af1d966e1082fda849452a25ee02a463cae408f /gramscii.c
parenta64ca9d14f8c197398badad39148b794757742b2 (diff)
add makefile
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;
}