The problem is in fact your understanding of SPVTEXTFRAG
. It's a single fragment, so it's expected to be chopped off. You must reassemble all fragments. The last fragment can be recognized by pNext==nullptr
.
Aslo, you should not call substr
on a fragment. It already is a fragment, you don't need fragments of fragments.