CleverRaven/Cataclysm-DDA — pull request #5129 by ianestrachan (2013-12-19 00:20:35+00:00)
Title: Prevent empty log messages from being written.

Fixes #5122.

The root cause seems to be from effects being applied to the player. (Creature.cpp, add_effect, line 385)

Not all effects have apply messages for the memorial log, but the message is applied unconditionally anyway, even if it's empty. Since the player being hit has an effect of its own, but no message, every time you are hit an empty message is added.

This PR unconditionally aborts a memorial log write when empty messages are passed in, to better handle any future code that uses the same style of unconditionally writing out messages to the log which may actually be empty strings.