Fix Qt text processing crash.

Fixes #4551.
This commit is contained in:
John Preston 2018-03-30 18:17:57 +04:00
parent 9dcfa3ad6e
commit 811fc43b63
2 changed files with 15 additions and 1 deletions

View File

@ -31,7 +31,20 @@ bool chIsBad(QChar ch) {
return true;
}
#endif // OS_MAC_OLD
return (ch == 0) || (ch >= 8232 && ch < 8237) || (ch >= 65024 && ch < 65040 && ch != 65039) || (ch >= 127 && ch < 160 && ch != 156) || (cPlatform() == dbipMac && ch >= 0x0B00 && ch <= 0x0B7F && chIsDiac(ch) && cIsElCapitan()); // tmp hack see https://bugreports.qt.io/browse/QTBUG-48910
return (ch == 0)
|| (ch >= 8232 && ch < 8237)
|| (ch >= 65024 && ch < 65040 && ch != 65039)
|| (ch >= 127 && ch < 160 && ch != 156)
// qt harfbuzz crash see https://github.com/telegramdesktop/tdesktop/issues/4551
|| (cPlatform() == dbipMac && ch == 6158)
// tmp hack see https://bugreports.qt.io/browse/QTBUG-48910
|| (cPlatform() == dbipMac
&& ch >= 0x0B00
&& ch <= 0x0B7F
&& chIsDiac(ch)
&& cIsElCapitan());
}
QString textcmdSkipBlock(ushort w, ushort h) {

View File

@ -2,6 +2,7 @@ macOS:
breakpad - clone breakpad like for msvc, including the patch, open breakpad/src/client/mac/Breakpad.xcodeproj and build Release
dump_syms - open breakpad/src/tools/mac/dump_syms/dump_syms.xcodeproj and build Release, copy dump_syms from ~/Library/Developer/Xcode/DerivedData/dump_syms-[a-z0-9]+/Build/Products/Release/ to BuildPath/Libraries/breakpad/src/tools/mac/dump_syms/build/Release/
minidump_stackwalk - go to Libraries/breakpad, run "configure", run "make"
Windows: