Skip to content

Attempting to delete subtitles in lua throws #491

@Didas-git

Description

@Didas-git

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;
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions