From 11502a6d4bd46ea98735444b051d1b78d574226b Mon Sep 17 00:00:00 2001 From: Jeongbin Park Date: Sun, 24 Jan 2021 04:42:37 +0100 Subject: [PATCH] reverted to good old fopen --- config.h.in | 2 +- read_twobit.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/config.h.in b/config.h.in index 253a608..043ab54 100644 --- a/config.h.in +++ b/config.h.in @@ -1,4 +1,4 @@ -#define _CRT_SECURE_NO_WARNINGS +#define _CRT_SECURE_NO_WARNINGS 1 #cmakedefine HAVE_DIRENT_H #cmakedefine BUILD_FOR_SNUCL diff --git a/read_twobit.cpp b/read_twobit.cpp index b947361..cdd72c0 100644 --- a/read_twobit.cpp +++ b/read_twobit.cpp @@ -52,8 +52,7 @@ int read_twobit(string &filepath, vector &chrnames, string &content, vec vector nblocksizes; #ifdef _WIN32 - FILE *input = 0; - assert(fopen_s(&input, filepath.c_str(), "rb") == 0); + FILE *input = fopen(filepath.c_str(), "rb"); #else FILE *input; char path_buf[PATH_MAX + 1]; memset(path_buf, 0, PATH_MAX + 1);