mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
94b192b134
commit
ae73428839
@ -40,7 +40,7 @@ class OutputDevice : public PdfOutputDevice {
|
|||||||
char *buf;
|
char *buf;
|
||||||
int res, len=1024;
|
int res, len=1024;
|
||||||
while(true) {
|
while(true) {
|
||||||
buf = new (std::nothrow) char[len];
|
buf = new (std::nothrow) char[len+1];
|
||||||
if (buf == NULL) { PyErr_NoMemory(); throw pyerr(); }
|
if (buf == NULL) { PyErr_NoMemory(); throw pyerr(); }
|
||||||
res = vsnprintf(buf, len, pszFormat, args);
|
res = vsnprintf(buf, len, pszFormat, args);
|
||||||
delete[] buf;
|
delete[] buf;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user