summaryrefslogtreecommitdiffstats
path: root/src/ClashAvoider.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ClashAvoider.cpp')
-rw-r--r--src/ClashAvoider.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ClashAvoider.cpp b/src/ClashAvoider.cpp
index c125db0b..293b9867 100644
--- a/src/ClashAvoider.cpp
+++ b/src/ClashAvoider.cpp
@@ -55,7 +55,9 @@ ClashAvoider::map_path(const Raul::Path& in)
const size_t pos = in.find_last_of('_');
if (pos != std::string::npos && pos != (in.length()-1)) {
const std::string trailing = in.substr(pos + 1);
- has_offset = (sscanf(trailing.c_str(), "%u", &offset) > 0);
+ char* end = nullptr;
+ strtoul(trailing.c_str(), &end, 10);
+ has_offset = (*end == '\0');
}
// Path without _n suffix