From e4774785937d596ff5105d53080627fd754d2c67 Mon Sep 17 00:00:00 2001 From: Eric Tang Date: Fri, 20 Sep 2019 15:49:55 -0700 Subject: [PATCH] Assign file descriptor for .bins output Assigns to the fx file descriptor in a larger scope, preventing a write to a NULL file descriptor when `bins=true`. --- compute_flow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compute_flow.cpp b/compute_flow.cpp index cf370d1..32c737c 100755 --- a/compute_flow.cpp +++ b/compute_flow.cpp @@ -260,7 +260,7 @@ int main( int argc, char *argv[] ) QString out_folder_bins = QString::fromStdString(out_path + "bins/" + fName); QDir().mkpath(out_folder_bins); std::string outfile = out_path + "bins/" + fName + ".bin"; - FILE *fx = fopen(outfile.c_str(),"wb"); + fx = fopen(outfile.c_str(),"wb"); }