summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaloyan Chehlarski <kaloyan.chehlarski@qt.io>2024-07-09 13:14:13 +0200
committerKaloyan Chehlarski <kaloyan.chehlarski@qt.io>2024-07-15 09:41:01 +0200
commitf4b3399471112ae5f6df86c649df2c6e25c99410 (patch)
tree0269c59b116fb39272d3bbab6041fc9b5fd70475
parent6cc62a4dacb7b1a93563d33abd93bb49cdef58fc (diff)
Remove usage of non-standard swprintf
WebEngineLibraryInfo::isRemoteDrivePath usea an MSVC-only, non-standard version of swprintf which doesn't have a len argument, triggering a compiler warning. This change adds the len argument, which fixes the warning. Pick-to: 6.7 6.8 Change-Id: I7124e5e5260ed39e46f7df4dc4dfc39521d6374d Reviewed-by: Michal Klocek <michal.klocek@qt.io>
-rw-r--r--src/core/web_engine_library_info.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp
index e64415faa..ef9d4c03f 100644
--- a/src/core/web_engine_library_info.cpp
+++ b/src/core/web_engine_library_info.cpp
@@ -429,7 +429,7 @@ std::string WebEngineLibraryInfo::getApplicationLocale()
bool WebEngineLibraryInfo::isRemoteDrivePath(const QString &path)
{
WCHAR wDriveLetter[4] = { 0 };
- swprintf(wDriveLetter, L"%S", path.mid(0, 3).toStdString().c_str());
+ swprintf(wDriveLetter, 4, L"%S", path.mid(0, 3).toStdString().c_str());
return GetDriveType(wDriveLetter) == DRIVE_REMOTE;
}