Commit 111e9c3e authored by C. Boemann's avatar C. Boemann

Fix unsafe looping

BUG: 326243

thanks Dennis for report and solution suggestion
parent e0297b38
......@@ -1934,7 +1934,7 @@ void KoCharacterStyle::removeDuplicates(const KoCharacterStyle &other)
int keepProperties[] = { QTextFormat::FontStyleHint, QTextFormat::FontFixedPitch, KoCharacterStyle::FontCharset };
QMap<int, QVariant> keep;
for (unsigned int i = 0; i < sizeof(keepProperties); ++i) {
for (unsigned int i = 0; i < sizeof(keepProperties)/sizeof(*keepProperties); ++i) {
if (hasProperty(keepProperties[i])) {
keep.insert(keepProperties[i], value(keepProperties[i]));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment