mirror of https://github.com/odrling/Aegisub
Fix error when trying to insert to the end of the file from auto4lua
Originally committed to SVN as r5760.
This commit is contained in:
parent
d4e17dde2e
commit
1364527681
|
@ -579,6 +579,12 @@ namespace Automation4 {
|
|||
luaL_argcheck(L, before > 0 && before <= (int)lines.size() + 1, 1,
|
||||
"Out of range line index");
|
||||
|
||||
if (before == (int)lines.size() + 1) {
|
||||
lua_remove(L, 1);
|
||||
ObjectAppend(L);
|
||||
return;
|
||||
}
|
||||
|
||||
SeekCursorTo(before);
|
||||
|
||||
int n = lua_gettop(L);
|
||||
|
|
Loading…
Reference in New Issue