Forget to check for _dataLength in commit 6be1a4707f
(new line for after stream write)
This commit is contained in:
parent
e4e6160a6b
commit
9d56c1d0b1
|
@ -107,7 +107,8 @@ namespace uPDFParser
|
|||
const char* streamData = (const char*)data(); // Force reading if not in memory
|
||||
res += std::string(streamData, _dataLength);
|
||||
// Be sure there is a final line return
|
||||
if (streamData[_dataLength-1] != '\n' &&
|
||||
if (_dataLength &&
|
||||
streamData[_dataLength-1] != '\n' &&
|
||||
streamData[_dataLength-1] != '\r')
|
||||
res += "\n";
|
||||
res += "endstream\n";
|
||||
|
|
Loading…
Reference in New Issue
Block a user