Skip to content

Commit

Permalink
LAGraph_SLoadSet.c: Open binary file in binary mode
Browse files Browse the repository at this point in the history
By default, files are opened in "text mode". That leads to a translation
of LF to CRLF on Windows/DOS. Open files in binary mode to avoid issues
when reading binary files.
  • Loading branch information
mmuetzel committed Oct 23, 2023
1 parent 3145cde commit dff9da9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion LAGraph/experimental/utility/LAGraph_SLoadSet.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ int LAGraph_SLoadSet // load a set of matrices from a *.lagraph file

if (filename != NULL)
{
f = fopen (filename, "r") ;
f = fopen (filename, "rb") ;
LG_ASSERT_MSG (f != NULL,
LAGRAPH_IO_ERROR, "unable to open input file") ;
}
Expand Down

0 comments on commit dff9da9

Please sign in to comment.