summaryrefslogtreecommitdiff
path: root/src/stl_binary_writer.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-06-04 11:21:54 +0100
committerCarl Hetherington <cth@carlh.net>2014-06-04 11:21:54 +0100
commite409a8b24d78684246e6dbf7092e1e1ac75da8ed (patch)
tree92db1cfe091c16026c2f1500b95965f55a92e5f8 /src/stl_binary_writer.cc
parentdf5e7ee155351ecd6e7ef52b1764149b5fcb258a (diff)
Various small bug fixes.
Diffstat (limited to 'src/stl_binary_writer.cc')
-rw-r--r--src/stl_binary_writer.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/stl_binary_writer.cc b/src/stl_binary_writer.cc
index c8dbc76..127bb97 100644
--- a/src/stl_binary_writer.cc
+++ b/src/stl_binary_writer.cc
@@ -102,8 +102,8 @@ sub::write_stl_binary (
assert (translated_episode_title.size() <= 32);
assert (translator_name.size() <= 32);
assert (translator_contact_details.size() <= 32);
- assert (creation_date.size() == 6);
- assert (revision_date.size() == 6);
+ assert (creation_date.size() == 8);
+ assert (revision_date.size() == 8);
assert (revision_number <= 99);
assert (country_of_origin.size() == 3);
assert (publisher.size() <= 32);
@@ -124,8 +124,8 @@ sub::write_stl_binary (
set<int> check_rows;
for (list<Subtitle>::const_iterator i = subtitles.begin(); i != subtitles.end(); ++i) {
- int t = 0;
for (list<Line>::const_iterator j = i->lines.begin(); j != i->lines.end(); ++j) {
+ int t = 0;
for (list<Block>::const_iterator k = j->blocks.begin(); k != j->blocks.end(); ++k) {
t += k->text.size ();
}
@@ -178,9 +178,9 @@ sub::write_stl_binary (
/* Total number of subtitle groups */
put_string (buffer + 248, "000");
/* Maximum number of displayable characters in any text row */
- put_int_as_string (buffer + 251, 2, longest);
+ put_int_as_string (buffer + 251, longest, 2);
/* Maximum number of displayable rows */
- put_int_as_string (buffer + 253, 2, rows);
+ put_int_as_string (buffer + 253, rows, 2);
/* Time code status */
put_string (buffer + 255, "1");
/* Start-of-programme time code */