summaryrefslogtreecommitdiffhomepage
path: root/mixlib/xmix_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'mixlib/xmix_io.c')
-rw-r--r--mixlib/xmix_io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mixlib/xmix_io.c b/mixlib/xmix_io.c
index 7511949..075b185 100644
--- a/mixlib/xmix_io.c
+++ b/mixlib/xmix_io.c
@@ -25,7 +25,7 @@
#include <fcntl.h>
#include "xmix_io.h"
-const char *io_OPENTYPE_[5] = { "r", "w", "w+", "a", "a+" };
+const char *io_OPENTYPE_[5] = { "r", "w", "r+", "a", "a+" };
/* initialise a mix_iochannel from a file descriptor */
@@ -47,7 +47,7 @@ io_init_from_fdesc_(mix_iochannel_t *ioc, int fdesc)
file = fdopen(fdesc, fmode_to_type_(mode));
g_return_val_if_fail(file != NULL, FALSE);
-
+ if (mode == mix_io_RDWRT) rewind (file);
io_init_from_file_(ioc, file);
return TRUE;