From f77e18ede02d010d2a1112e190bb33d218286386 Mon Sep 17 00:00:00 2001 From: Tatsuya79 Date: Tue, 3 Nov 2020 16:15:37 +0100 Subject: [PATCH] fix string_split_to_qt --- ui/drivers/ui_qt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/drivers/ui_qt.cpp b/ui/drivers/ui_qt.cpp index ac8487fb6e..97ec345b34 100644 --- a/ui/drivers/ui_qt.cpp +++ b/ui/drivers/ui_qt.cpp @@ -776,7 +776,7 @@ QStringList string_split_to_qt(QString str, char delim) int spl = str.indexOf(delim, at); /* Store split into list of extensions */ - list << str.mid(at, (spl < 0 ? str.length() : spl)); + list << str.mid(at, (spl < 0 ? -1 : spl - at)); /* No more splits */ if (spl < 0)