Skip to content

Commit

Permalink
Fixed crash when an empty syllable was present
Browse files Browse the repository at this point in the history
Bumped to v1.0
  • Loading branch information
Cobrand committed Nov 20, 2016
1 parent 7c3ac56 commit 682396d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "toyunda-player-rs"
version = "0.2.0"
version = "1.0.0"
license = "MIT/Apache-2.0"
authors = ["Cobrand <[email protected]>"]
build = "build.rs"
Expand Down
2 changes: 2 additions & 0 deletions src/subtitles/sub.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,14 @@ impl Subtitles {
{
for tmp_syllables in sentence.syllables.windows(2) {
let (syllable1, syllable2) = (&tmp_syllables[0], &tmp_syllables[1]);
if !syllable1.text.is_empty() {
add_syllable(&mut text_elts,
syllable1,
Some(syllable2),
default_syllable_options.as_ref(),
current_time,
sentence_alpha);
}
}
match sentence.syllables.last() {
Some(last_syllable) => {
Expand Down

0 comments on commit 682396d

Please sign in to comment.