1. Matt Oswald
  2. xUnit++
  3. Issues
Issue #12 resolved

console tries to access invalid user string

Matt Oswald
repo owner created an issue

std::string xUnitAssert::UserMessage() const { return userMessage->str(); }

Returns a temporary, and is then used in the console (and other reporters) like this:

const char *TestEvent::GetUserMessage() const { return assert.UserMessage().c_str(); }

As a temporary, this memory is immediately reclaimed.

Comments (2)

  1. Log in to comment