summaryrefslogtreecommitdiffstats
path: root/src/Path.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Path.cpp')
-rw-r--r--src/Path.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Path.cpp b/src/Path.cpp
index 4a41979..bd4a17a 100644
--- a/src/Path.cpp
+++ b/src/Path.cpp
@@ -187,7 +187,7 @@ Path::replace_invalid_chars(string& str, bool replace_slash)
}
}
- if (str[str.length()-1] == '_')
+ if (str.length() != 1 && str[str.length()-1] == '_')
str = str.substr(0, str.length()-1);
}