Only consider continuation tokens at end of line
parent
2f1ff974fd
commit
3718980c09
|
@ -254,25 +254,16 @@ bool IOStreamBuffer<T>::getNextDataLine( std::vector<T> &buffer, T continuationT
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool continuationFound( false );
|
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
for( ;; ) {
|
for( ;; ) {
|
||||||
if ( continuationToken == m_cache[ m_cachePos ] ) {
|
if ( continuationToken == m_cache[ m_cachePos ] && IsLineEnd( m_cache[ m_cachePos + 1 ] ) ) {
|
||||||
continuationFound = true;
|
++m_cachePos;
|
||||||
|
while (m_cache[m_cachePos] != '\n') {
|
||||||
++m_cachePos;
|
++m_cachePos;
|
||||||
}
|
}
|
||||||
if ( IsLineEnd( m_cache[ m_cachePos ] ) ) {
|
++m_cachePos;
|
||||||
if ( !continuationFound ) {
|
} else if ( IsLineEnd ( m_cache[ m_cachePos ] ) ) {
|
||||||
// the end of the data line
|
|
||||||
break;
|
break;
|
||||||
} else {
|
|
||||||
// skip line end
|
|
||||||
while ( m_cache[m_cachePos] != '\n') {
|
|
||||||
++m_cachePos;
|
|
||||||
}
|
|
||||||
++m_cachePos;
|
|
||||||
continuationFound = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer[ i ] = m_cache[ m_cachePos ];
|
buffer[ i ] = m_cache[ m_cachePos ];
|
||||||
|
|
Loading…
Reference in New Issue