plat: use size_t for global dir path buffer length

This commit is contained in:
David Hrdlička
2025-05-03 01:41:18 +02:00
parent db842cf545
commit 4b55dc8cae
3 changed files with 10 additions and 10 deletions

View File

@@ -595,14 +595,14 @@ ProgSettings::reloadStrings()
{
translatedstrings.clear();
translatedstrings[STRING_MOUSE_CAPTURE] = QCoreApplication::translate("", "Click to capture mouse").toStdWString();
char mouseCaptureKeyseq[100];
sprintf(mouseCaptureKeyseq, qPrintable(QCoreApplication::translate("", "Press %s to release mouse")), acc_keys[FindAccelerator("release_mouse")].seq);
translatedstrings[STRING_MOUSE_RELEASE] = QString(mouseCaptureKeyseq).toStdWString();
sprintf(mouseCaptureKeyseq, qPrintable(QCoreApplication::translate("", "Press %s or middle button to release mouse")), acc_keys[FindAccelerator("release_mouse")].seq);
translatedstrings[STRING_MOUSE_RELEASE_MMB] = QString(mouseCaptureKeyseq).toStdWString();
translatedstrings[STRING_MOUSE_RELEASE_MMB] = QString(mouseCaptureKeyseq).toStdWString();
translatedstrings[STRING_INVALID_CONFIG] = QCoreApplication::translate("", "Invalid configuration").toStdWString();
translatedstrings[STRING_NO_ST506_ESDI_CDROM] = QCoreApplication::translate("", "MFM/RLL or ESDI CD-ROM drives never existed").toStdWString();
translatedstrings[STRING_PCAP_ERROR_NO_DEVICES] = QCoreApplication::translate("", "No PCap devices found").toStdWString();
@@ -639,7 +639,7 @@ plat_chdir(char *path)
}
void
plat_get_global_config_dir(char *outbuf, const uint8_t len)
plat_get_global_config_dir(char *outbuf, const size_t len)
{
const auto dir = QDir(QStandardPaths::standardLocations(QStandardPaths::AppConfigLocation)[0]);
if (!dir.exists()) {
@@ -651,7 +651,7 @@ plat_get_global_config_dir(char *outbuf, const uint8_t len)
}
void
plat_get_global_data_dir(char *outbuf, const uint8_t len)
plat_get_global_data_dir(char *outbuf, const size_t len)
{
const auto dir = QDir(QStandardPaths::standardLocations(QStandardPaths::AppDataLocation)[0]);
if (!dir.exists()) {