The documentation mentions subtitles[i] = nil as a way to delete subtitles, this also happens to be the only viable way to do so from C as currently, the .delete method via closures is unusable due to it relying on the stack size instead of upvalues.
The issue seems to be caused by the check_uint in this block:
|
else { |
|
ids.reserve(itemcount); |
|
while (itemcount > 0) { |
|
size_t n = check_uint(L, -1); |
|
argcheck(L, n > 0 && n <= lines.size(), itemcount, "Out of range line index"); |
|
ids.push_back(n - 1); |
|
--itemcount; |
|
} |
|
} |
The documentation mentions
subtitles[i] = nilas a way to delete subtitles, this also happens to be the only viable way to do so from C as currently, the.deletemethod via closures is unusable due to it relying on the stack size instead of upvalues.The issue seems to be caused by the
check_uintin this block:Aegisub/src/auto4_lua_assfile.cpp
Lines 511 to 519 in 1ad6844