diff options
Diffstat (limited to 'qtools')
-rw-r--r-- | qtools/Doxyfile | 2 | ||||
-rw-r--r-- | qtools/scstring.cpp | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/qtools/Doxyfile b/qtools/Doxyfile index 9e2a9f4..329fb48 100644 --- a/qtools/Doxyfile +++ b/qtools/Doxyfile @@ -171,7 +171,7 @@ FORMULA_TRANSPARENT = YES USE_MATHJAX = NO MATHJAX_RELPATH = http://www.mathjax.org/mathjax SEARCHENGINE = YES -SERVER_BASED_SEARCH = NO +SERVER_BASED_SEARCH = YES #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- diff --git a/qtools/scstring.cpp b/qtools/scstring.cpp index 698e036..26d3a52 100644 --- a/qtools/scstring.cpp +++ b/qtools/scstring.cpp @@ -141,15 +141,16 @@ SCString &SCString::sprintf( const char *format, ... ) va_list ap; va_start( ap, format ); uint l = length(); - const uint minlen=256; + const uint minlen=4095; if (l<minlen) { if (m_data) - m_data = (char *)realloc(m_data,minlen); + m_data = (char *)realloc(m_data,minlen+1); else - m_data = (char *)malloc(minlen); + m_data = (char *)malloc(minlen+1); + m_data[minlen]='\0'; } - vsprintf( m_data, format, ap ); + vsnprintf( m_data, minlen, format, ap ); resize( qstrlen(m_data) + 1 ); // truncate va_end( ap ); return *this; |