Permalink
Browse files

Fixed potential crash caused by overloading the variadic warn function

  • Loading branch information...
Dimitri van Heesch
Dimitri van Heesch committed Jan 18, 2014
1 parent ac81313 commit 31505eb34565b2e39d113b7f5460645d02ad6d2e
Showing with 4 additions and 4 deletions.
  1. +1 −1 src/message.cpp
  2. +1 −1 src/message.h
  3. +2 −2 src/template.cpp
View
@@ -172,7 +172,7 @@ void warn(const char *file,int line,const char *fmt, ...)
va_end(args);
}
void warn(const char *file,int line,const char *fmt,va_list args)
void va_warn(const char *file,int line,const char *fmt,va_list args)
{
do_warn("WARNINGS", file, line, warning_str, fmt, args);
}
View
@@ -23,7 +23,7 @@
extern void msg(const char *fmt, ...);
extern void warn(const char *file,int line,const char *fmt, ...);
extern void warn(const char *file,int line,const char *fmt, va_list args);
extern void va_warn(const char *file,int line,const char *fmt, va_list args);
extern void warn_simple(const char *file,int line,const char *text);
extern void warn_undoc(const char *file,int line,const char *fmt, ...);
extern void warn_doc_error(const char *file,int line,const char *fmt, ...);
View
@@ -1713,7 +1713,7 @@ void TemplateContextImpl::warn(const char *fileName,int line,const char *fmt,...
{
va_list args;
va_start(args,fmt);
::warn(fileName,line,fmt,args);
va_warn(fileName,line,fmt,args);
va_end(args);
m_engine->printIncludeContext(fileName,line);
}
@@ -3342,7 +3342,7 @@ void TemplateParser::warn(const char *fileName,int line,const char *fmt,...) con
{
va_list args;
va_start(args,fmt);
::warn(fileName,line,fmt,args);
va_warn(fileName,line,fmt,args);
va_end(args);
m_engine->printIncludeContext(fileName,line);
}

0 comments on commit 31505eb

Please sign in to comment.