From 17d1b67a77c9e3c4fe23e945952063b80d67b32a Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Wed, 18 Jan 2012 12:40:31 +0100 Subject: [PATCH] Fixed bug in fopen(3) where it didn't open correctly. --- libmaxsi/c/fdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmaxsi/c/fdio.c b/libmaxsi/c/fdio.c index e82e356f..fed7bf7d 100644 --- a/libmaxsi/c/fdio.c +++ b/libmaxsi/c/fdio.c @@ -184,7 +184,7 @@ FILE* fopen(const char* path, const char* mode) default: errno = EINVAL; return 0; } } - int fd = open(path, fd, 0666); + int fd = open(path, omode | oflags, 0666); if ( fd < 0 ) { return NULL; } FILE* fp = fdopen(fd, mode); if ( !fp ) { close(fd); return NULL; }