summaryrefslogtreecommitdiff
path: root/core/fxge
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxge')
-rw-r--r--core/fxge/android/cfpf_skiafontmgr.cpp4
-rw-r--r--core/fxge/win32/cpsoutput.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/core/fxge/android/cfpf_skiafontmgr.cpp b/core/fxge/android/cfpf_skiafontmgr.cpp
index ec5c610150..23fcd5bbec 100644
--- a/core/fxge/android/cfpf_skiafontmgr.cpp
+++ b/core/fxge/android/cfpf_skiafontmgr.cpp
@@ -161,7 +161,7 @@ uint32_t FPF_SkiaGetCharset(uint8_t uCharset) {
uint32_t FPF_SKIANormalizeFontName(const CFX_ByteStringC& bsfamily) {
uint32_t dwHash = 0;
int32_t iLength = bsfamily.GetLength();
- const char* pBuffer = bsfamily.c_str();
+ const char* pBuffer = bsfamily.unterminated_c_str();
for (int32_t i = 0; i < iLength; i++) {
char ch = pBuffer[i];
if (ch == ' ' || ch == '-' || ch == ',')
@@ -395,7 +395,7 @@ FXFT_Face CFPF_SkiaFontMgr::GetFontFace(const CFX_ByteStringC& bsFile,
return nullptr;
FXFT_Open_Args args;
args.flags = FT_OPEN_PATHNAME;
- args.pathname = const_cast<FT_String*>(bsFile.c_str());
+ args.pathname = const_cast<FT_String*>(bsFile.unterminated_c_str());
FXFT_Face face;
if (FXFT_Open_Face(m_FTLibrary, &args, iFaceIndex, &face))
return nullptr;
diff --git a/core/fxge/win32/cpsoutput.cpp b/core/fxge/win32/cpsoutput.cpp
index 7139340a6e..1af6dbdced 100644
--- a/core/fxge/win32/cpsoutput.cpp
+++ b/core/fxge/win32/cpsoutput.cpp
@@ -32,5 +32,5 @@ bool CPSOutput::WriteBlock(const void* str, size_t len) {
}
bool CPSOutput::WriteString(const CFX_ByteStringC& str) {
- return WriteBlock(str.c_str(), str.GetLength());
+ return WriteBlock(str.unterminated_c_str(), str.GetLength());
}