summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/support/path.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/support/path.cpp b/src/support/path.cpp
index d3f5075c2..1858fe1e9 100644
--- a/src/support/path.cpp
+++ b/src/support/path.cpp
@@ -81,7 +81,7 @@ std::string getBinaryenBinDir() {
void setBinaryenBinDir(const std::string& dir) {
binDir = dir;
- if (binDir.back() != getPathSeparator()) {
+ if (binDir.empty() || binDir.back() != getPathSeparator()) {
binDir += getPathSeparator();
}
}