summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-06-23 16:06:18 +0100
committerCarl Hetherington <cth@carlh.net>2014-06-23 16:06:18 +0100
commitd746b1b16f4aa093ecdad80376bf90456a7708d3 (patch)
tree91ec6005a3679e1e5a664d8700daffc39d510a1d /src
parent5a31b47bc7523a522f9c6c3588133004ba4c578c (diff)
memset() buffers to keep tests repeatable.
Diffstat (limited to 'src')
-rw-r--r--src/stl_binary_writer.cc3
1 files changed, 3 insertions, 0 deletions
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<Subtitle>::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 */