Skip to content

Commit

Permalink
Hack because of internal buffer overflow when writing binary data fil…
Browse files Browse the repository at this point in the history
…es in icc + stdc++
  • Loading branch information
juanjosegarciaripoll committed Feb 22, 2018
1 parent 5a19402 commit eaa6880
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/sdf/odata_file.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ void write_raw_with_endian(std::ofstream &s, const number *data, size_t n)
std::cerr << "I/O error when writing to SDF stream";
abort();
}
// Horrible hack to ensure icc flushes our buffers and does not
// cause buffer overflow.
s.flush();
}

#else
Expand Down

0 comments on commit eaa6880

Please sign in to comment.