forked from mia/Aegisub
Make the karaoke syllable table from aegisub.parse_karaoke_data zero-based for backward compatibility
Originally committed to SVN as r5694.
This commit is contained in:
parent
5c75c9f708
commit
3776051f96
1 changed files with 2 additions and 1 deletions
|
@ -620,6 +620,7 @@ namespace Automation4 {
|
|||
AssDialogue *dia = dynamic_cast<AssDialogue*>(e.get());
|
||||
luaL_argcheck(L, dia, 1, "Subtitle line must be a dialogue line");
|
||||
|
||||
int idx = 0;
|
||||
AssKaraoke kara(dia);
|
||||
for (AssKaraoke::iterator it = kara.begin(); it != kara.end(); ++it) {
|
||||
lua_newtable(L);
|
||||
|
@ -629,7 +630,7 @@ namespace Automation4 {
|
|||
set_field(L, "tag", it->tag_type);
|
||||
set_field(L, "text", it->GetText(false));
|
||||
set_field(L, "text_stripped", it->text);
|
||||
lua_rawseti(L, -2, -1);
|
||||
lua_rawseti(L, -2, idx++);
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
Loading…
Reference in a new issue