Forget to check for _dataLength in commit 6be1a4707ff0b1cb1ea86e03f54d1d1e95233e7e (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
|
const char* streamData = (const char*)data(); // Force reading if not in memory
|
||||||
res += std::string(streamData, _dataLength);
|
res += std::string(streamData, _dataLength);
|
||||||
// Be sure there is a final line return
|
// Be sure there is a final line return
|
||||||
if (streamData[_dataLength-1] != '\n' &&
|
if (_dataLength &&
|
||||||
|
streamData[_dataLength-1] != '\n' &&
|
||||||
streamData[_dataLength-1] != '\r')
|
streamData[_dataLength-1] != '\r')
|
||||||
res += "\n";
|
res += "\n";
|
||||||
res += "endstream\n";
|
res += "endstream\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user