Commit de46ed7f by cdrolle Committed by Oliver Woodman

Fixed an issue with Cea608Decoder in which tab commands were not being used correctly.

Tab commands were being used cumulatively (i.e. moving the cursor farther and farther over) resulting in the text eventually trying to write beyond the bounds of the screen and throwing an exception.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=146783284
parent 7c8a3d00
......@@ -364,7 +364,7 @@ public final class Cea608Decoder extends CeaDecoder {
} else if (isPreambleAddressCode(cc1, cc2)) {
handlePreambleAddressCode(cc1, cc2);
} else if (isTabCtrlCode(cc1, cc2)) {
currentCueBuilder.tab(cc2 - 0x20);
currentCueBuilder.setTab(cc2 - 0x20);
} else if (isMiscCode(cc1, cc2)) {
handleMiscCode(cc2);
}
......@@ -646,8 +646,8 @@ public final class Cea608Decoder extends CeaDecoder {
this.indent = indent;
}
public void tab(int tabs) {
tabOffset += tabs;
public void setTab(int tabs) {
tabOffset = tabs;
}
public void setPreambleStyle(CharacterStyle style) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment