diff --git a/ui/src/main/java/com/dat3m/ui/editor/Editor.java b/ui/src/main/java/com/dat3m/ui/editor/Editor.java index 8df2bcaef9..5d38a01294 100644 --- a/ui/src/main/java/com/dat3m/ui/editor/Editor.java +++ b/ui/src/main/java/com/dat3m/ui/editor/Editor.java @@ -100,7 +100,7 @@ public void actionPerformed(ActionEvent event) { if (chooser.showOpenDialog(null) == APPROVE_OPTION) { String path = chooser.getSelectedFile().getPath(); loadedPath = path.substring(0, path.lastIndexOf('/') + 1); - String format = path.endsWith("spv.dis") ? "spv.dis" : path.substring(path.indexOf('.') + 1).trim(); + String format = path.endsWith("spv.dis") ? "spv.dis" : path.substring(path.lastIndexOf('.') + 1).trim(); if (allowedFormats.contains(format)) { loadedFormat = format; notifyListeners();