summaryrefslogtreecommitdiff
path: root/src/modules/fonts/services.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/fonts/services.cpp')
-rw-r--r--src/modules/fonts/services.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/fonts/services.cpp b/src/modules/fonts/services.cpp
index 1c7b0783dd..63ab76242c 100644
--- a/src/modules/fonts/services.cpp
+++ b/src/modules/fonts/services.cpp
@@ -142,8 +142,10 @@ int GetFontSettingFromDB(char *settings_group, char *prefix, LOGFONT* lf, COLORR
GetDefaultFontSetting(lf, colour);
- if (flags & FIDF_APPENDNAME) mir_snprintf(idstr, SIZEOF(idstr), "%sName", prefix);
- else mir_snprintf(idstr, SIZEOF(idstr), "%s", prefix);
+ if (flags & FIDF_APPENDNAME)
+ mir_snprintf(idstr, SIZEOF(idstr), "%sName", prefix);
+ else
+ strncpy_s(idstr, prefix, _TRUNCATE);
if (!db_get_ts(NULL, settings_group, idstr, &dbv)) {
_tcscpy(lf->lfFaceName, dbv.ptszVal);