From d746b1b16f4aa093ecdad80376bf90456a7708d3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 23 Jun 2014 16:06:18 +0100 Subject: memset() buffers to keep tests repeatable. --- src/stl_binary_writer.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/stl_binary_writer.cc b/src/stl_binary_writer.cc index 74e26ea..4453332 100644 --- a/src/stl_binary_writer.cc +++ b/src/stl_binary_writer.cc @@ -111,6 +111,7 @@ sub::write_stl_binary ( assert (editor_contact_details.size() <= 32); char* buffer = new char[1024]; + memset (buffer, 0, 1024); ofstream output (file_name.string().c_str ()); STLBinaryTables tables; @@ -201,6 +202,8 @@ sub::write_stl_binary ( int N = 0; for (list::const_iterator i = subtitles.begin(); i != subtitles.end(); ++i) { + memset (buffer, 0, 1024); + /* Subtitle group number */ put_int_as_int (buffer + 0, 1, 1); /* Subtitle number */ -- cgit v1.2.3