mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-05-29 10:12:34 -04:00
Ensure PrintVLen always adds a byte for trailing NULL
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user