Skip to content
This repository was archived by the owner on Feb 10, 2026. It is now read-only.

Commit 08cca75

Browse files
committed
Add comment to address review feedback
1 parent 1af209e commit 08cca75

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib/xmlparse.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2632,6 +2632,7 @@ impl<'scf> XML_ParserStruct<'scf> {
26322632
}
26332633
/* fall through */
26342634
self.m_parsingStatus.parsing = XML_Parsing::PARSING;
2635+
// convert in-out parameter `start` from index to pointer
26352636
// TODO(SJC): is signed overflow an issue here?
26362637
start = self.m_buffer.as_ptr().add(self.m_bufferStart);
26372638
self.m_positionIdx = self.m_bufferStart;
@@ -2644,6 +2645,7 @@ impl<'scf> XML_ParserStruct<'scf> {
26442645
self.m_buffer[self.m_bufferStart..self.m_bufferEnd].into(),
26452646
&mut start,
26462647
);
2648+
// convert in-out parameter `start` from pointer back to index
26472649
self.m_bufferStart = start.wrapping_offset_from(self.m_buffer.as_ptr()) as usize;
26482650
if self.m_errorCode != XML_Error::NONE {
26492651
self.m_eventEndPtr = self.m_eventPtr;

0 commit comments

Comments
 (0)