Skip to content

Commit 5e754af

Browse files
committed
Fixed issue 1133 - part2
1 parent 53eab2e commit 5e754af

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

training/pango_font_info.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,9 @@ int PangoFontInfo::DropUncoveredChars(string* utf8_text) const {
280280
++num_dropped_chars;
281281
continue;
282282
}
283-
strncpy(out, it.utf8_data(), it.utf8_len());
284-
out += it.utf8_len();
283+
int it_utf8_len = it.utf8_len();
284+
strncpy(out, it.utf8_data(), it_utf8_len);
285+
out += it_utf8_len;
285286
}
286287
utf8_text->resize(out - utf8_text->c_str());
287288
return num_dropped_chars;

0 commit comments

Comments
 (0)