mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Ensure PrintVLen always adds a byte for trailing NULL
This commit is contained in:
parent
523bf9f4eb
commit
298df07987
@ -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…
x
Reference in New Issue
Block a user