Merge pull request #68 from Kashinathpat/patch-1

Fix Shortcuts crash
This commit is contained in:
BrunoSX 2024-07-25 16:35:19 -03:00 committed by GitHub
commit eed37d6804
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -36,9 +36,10 @@ public class Shortcut {
int index;
for (String line : FileUtils.readLines(file)) {
index = line.indexOf("[");
if (index != -1) {
section = line.substring(index+1, line.indexOf("]", index));
line = line.trim();
if (line.isEmpty() || line.startsWith("#")) continue; // Skip empty lines and comments
if (line.startsWith("[")) {
section = line.substring(1, line.indexOf("]"));
}
else {
index = line.indexOf("=");