Переглянути джерело

Bug 65293 -- npe in HwmfFont

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1889636 13f79535-47bb-0310-9956-ffa450edef68
tags/REL_5_1_0
Tim Allison 3 роки тому
джерело
коміт
b3f53ff0bc

+ 2
- 1
poi-scratchpad/src/main/java/org/apache/poi/hwmf/record/HwmfFont.java Переглянути файл

@@ -410,7 +410,8 @@ public class HwmfFont implements FontInfo, GenericRecord {
pitchAndFamily = leis.readUByte();

StringBuilder sb = new StringBuilder();
int readBytes = readString(leis, sb, 32, charSet.getCharset());
Charset actualCharset = (charSet == null) ? null : charSet.getCharset();
int readBytes = readString(leis, sb, 32, actualCharset);
if (readBytes == -1) {
throw new IOException("Font facename can't be determined.");
}

Завантаження…
Відмінити
Зберегти