summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ratox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ratox.c b/ratox.c
index f9400d5..80e5502 100644
--- a/ratox.c
+++ b/ratox.c
@@ -605,7 +605,7 @@ datasave(void)
uint8_t *data;
int fd;
- fd = open(DATAFILE, O_WRONLY | O_CREAT , 0644);
+ fd = open(DATAFILE, O_WRONLY | O_TRUNC | O_CREAT , 0644);
if (fd < 0) {
perror("open");
exit(EXIT_FAILURE);