From 98584550358c486e7e95ea3a1124f4a35c2746d2 Mon Sep 17 00:00:00 2001 From: Xiao Yi Fang Date: Fri, 19 Jul 2024 13:55:06 +0800 Subject: [PATCH] fix: stardict crash with access_read_violation --- src/dict/stardict.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dict/stardict.cc b/src/dict/stardict.cc index 46862641..cbc51292 100644 --- a/src/dict/stardict.cc +++ b/src/dict/stardict.cc @@ -545,7 +545,7 @@ string StardictDictionary::handleResource( char type, char const * resource, siz articleNewText.clear(); } - return ( articleText.toUtf8().data() ); + return articleText.toStdString(); } case 'm': // Pure meaning, usually means preformatted text return "
" + Html::preformat( string( resource, size ), isToLanguageRTL() ) + "
";