projects
/
unix-history
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f8dd066
)
Fix error with creating scorefile
author
Andrey Chernov
<ache@FreeBSD.org>
Tue, 25 Jan 1994 01:58:08 +0000
(
01:58
+0000)
committer
Andrey Chernov
<ache@FreeBSD.org>
Tue, 25 Jan 1994 01:58:08 +0000
(
01:58
+0000)
games/rogue/score.c
patch
|
blob
|
blame
|
history
diff --git
a/games/rogue/score.c
b/games/rogue/score.c
index
f4fd5d4
..
275cf42
100644
(file)
--- a/
games/rogue/score.c
+++ b/
games/rogue/score.c
@@
-206,7
+206,8
@@
short other;
md_lock(1);
md_lock(1);
- if ((fp = fopen(_PATH_SCOREFILE, "r+")) == NULL) {
+ if ( (fp = fopen(_PATH_SCOREFILE, "r+")) == NULL
+ && (fp = fopen(_PATH_SCOREFILE, "w+")) == NULL) {
message("cannot read/write/create score file", 0);
sf_error();
}
message("cannot read/write/create score file", 0);
sf_error();
}