Fix assertion failures on str operations

This commit is contained in:
pryon 2024-09-21 20:02:58 +02:00
parent 2a13fca737
commit 173ca3e58e
2 changed files with 22 additions and 8 deletions

View file

@ -83,7 +83,7 @@ void PickFile(const char *name, Listener *obj, Event& event)
if (name && *name && strchr(name, '/')) {
currentpath = name;
for (i = currentpath.length(); i > 0; i--) {
for (i = currentpath.length() - 1; i > 0; i--) {
if (currentpath[i] == '/') {
break;
}