mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-29 13:12:59 +02:00
Ensure PrintVLen always adds a byte for trailing NULL
This commit is contained in:
parent
523bf9f4eb
commit
298df07987
1 changed files with 2 additions and 2 deletions
|
|
@ -50,9 +50,9 @@ class OutputDevice : public PdfOutputDevice {
|
|||
if( !pszFormat ) { PODOFO_RAISE_ERROR( ePdfError_InvalidHandle ); }
|
||||
|
||||
#ifdef _MSC_VER
|
||||
return _vscprintf(pszFormat, args);
|
||||
return _vscprintf(pszFormat, args) + 1;
|
||||
#else
|
||||
return vsnprintf(NULL, 0, pszFormat, args);
|
||||
return vsnprintf(NULL, 0, pszFormat, args) + 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue