summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qlowenergycontroller_win.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bluetooth/qlowenergycontroller_win.cpp')
-rw-r--r--src/bluetooth/qlowenergycontroller_win.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bluetooth/qlowenergycontroller_win.cpp b/src/bluetooth/qlowenergycontroller_win.cpp
index 56382e69..f7a1611f 100644
--- a/src/bluetooth/qlowenergycontroller_win.cpp
+++ b/src/bluetooth/qlowenergycontroller_win.cpp
@@ -96,7 +96,7 @@ static bool gattFunctionsResolved = false;
static QBluetoothAddress getDeviceAddress(const QString &servicePath)
{
- const int firstbound = servicePath.indexOf(QStringLiteral("_"));
+ const int firstbound = servicePath.lastIndexOf(QStringLiteral("_"));
const int lastbound = servicePath.indexOf(QLatin1Char('#'), firstbound);
const QString hex = servicePath.mid(firstbound + 1, lastbound - firstbound - 1);
bool ok = false;