Skip to content

Commit

Permalink
One minor lgtm fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Nov 20, 2021
1 parent 8029523 commit d20262c
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions src/main/java/com/ctc/wstx/dtd/FullDTDReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -1662,22 +1662,17 @@ private void parseAttrDefaultValue(DefaultAttrValue defVal, char quoteChar, Pref
// Ok, should have updated the input source by now
continue main_loop;
}

if (c <= 0xFFFF) {

} else{
if (d <= 0xFFFF) {
c = (char) d;
} else {
// Need more room?
if (outPtr >= outBuf.length) {
outBuf = tb.finishCurrentSegment();
outPtr = 0;
}
d -= 0x10000;
outBuf[outPtr++] = (char) ((d >> 10) + 0xD800);;
c = (char) ((d & 0x3FF) + 0xDC00);
if (d <= 0xFFFF) {
c = (char) d;
} else {
// Need more room?
if (outPtr >= outBuf.length) {
outBuf = tb.finishCurrentSegment();
outPtr = 0;
}
d -= 0x10000;
outBuf[outPtr++] = (char) ((d >> 10) + 0xD800);;
c = (char) ((d & 0x3FF) + 0xDC00);
}
} else if (c == '<') {
throwDTDUnexpectedChar(c, SUFFIX_IN_DEF_ATTR_VALUE);
Expand Down

0 comments on commit d20262c

Please sign in to comment.