diff options
Diffstat (limited to 'src/corelib/text/qunicodetools.cpp')
-rw-r--r-- | src/corelib/text/qunicodetools.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/text/qunicodetools.cpp b/src/corelib/text/qunicodetools.cpp index 0db3dc74c6..76072f8282 100644 --- a/src/corelib/text/qunicodetools.cpp +++ b/src/corelib/text/qunicodetools.cpp @@ -792,7 +792,7 @@ Q_CORE_EXPORT void initCharAttributes(const ushort *string, int length, // // ---------------------------------------------------------------------------- -Q_CORE_EXPORT void initScripts(const ushort *string, int length, uchar *scripts) +Q_CORE_EXPORT void initScripts(const ushort *string, int length, ScriptItemArray *scripts) { int sor = 0; int eor = 0; @@ -832,7 +832,7 @@ Q_CORE_EXPORT void initScripts(const ushort *string, int length, uchar *scripts) Q_ASSERT(script > QChar::Script_Common); Q_ASSERT(sor < eor); - ::memset(scripts + sor, script, (eor - sor) * sizeof(uchar)); + scripts->append(ScriptItem{sor, script}); sor = eor; script = nscript; @@ -840,7 +840,7 @@ Q_CORE_EXPORT void initScripts(const ushort *string, int length, uchar *scripts) Q_ASSERT(script >= QChar::Script_Common); Q_ASSERT(eor == length); - ::memset(scripts + sor, script, (eor - sor) * sizeof(uchar)); + scripts->append(ScriptItem{sor, script}); } } // namespace QUnicodeTools |