From 0da84a7388c7f3f1ce9a36dc65246a4bb46bd3f7 Mon Sep 17 00:00:00 2001 From: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com> Date: Tue, 30 Apr 2024 20:40:14 -0400 Subject: [PATCH] connectionmanager: improve portability of string to integer conversion On Windows using MSC, unsigned long is 32 bits even on 64-bit systems, while unsigned long long is 64 bits. This commit replaces the call to std::stoul with std::stoull which should be portable. This will address the following Jami-client issue: https://git.jami.net/savoirfairelinux/jami-client-qt/-/issues/1419 Change-Id: I9f7998573f493f479b9f97bf5d56ef65b8b58f57 --- src/connectionmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connectionmanager.cpp b/src/connectionmanager.cpp index c209d9a..c0bde96 100644 --- a/src/connectionmanager.cpp +++ b/src/connectionmanager.cpp @@ -54,7 +54,7 @@ std::pair<dhtnet::DeviceId, dht::Value::Id> parseCallbackId(std::string_view ci) std::string_view vidString = ci.substr(sep + 1); dhtnet::DeviceId deviceId(deviceIdString); - dht::Value::Id vid = std::stoul(std::string(vidString), nullptr, 10); + dht::Value::Id vid = std::stoull(std::string(vidString), nullptr, 10); return {deviceId, vid}; } -- GitLab