Skip to content

Commit

Permalink
Let ModelicaFormatError format the message
Browse files Browse the repository at this point in the history
  • Loading branch information
rfranke committed Mar 27, 2016
1 parent 86d4eee commit 84a39dc
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -46,12 +46,12 @@ void ModelicaVFormatError(const char*string, va_list args)

void ModelicaFormatError(const char* text, ...)
{
std::stringstream ss;
char buffer[256];
va_list args;
va_start(args, text);
ss << text;
vsnprintf(buffer, 256, text, args);
va_end(args);
ModelicaError(ss.str().c_str());
ModelicaError(buffer);
}

static std::map<const char*, char*> _allocatedStrings;
Expand Down

0 comments on commit 84a39dc

Please sign in to comment.