NetPlayDiag::FindGame() returns const reference to std:tring.
If game path isn't found, it returns "".
Because of implicit conversion, it results:
return std:tring("");
Using a reference to a destroyed object causes undefined behavior.
This commit fixes it by returning copied std:tring objects.

Indeed, this is invalid C++ code. I just landed revision a791733c27fa with the fix. Performance is certainly not going to be a problem, so no need to worry.

By the way, these forums mangle whitespace something nasty. If you want patches to be applied directly from your diff, then I recommend you use git format-patch (you appear to be doing this correctly already) and upload the patch to somewhere else. (A pastebin will probably work, though I actually recommend something that hosts binary files- that way, we can be completely sure the file is byte-for-byte what it was when git produced it.)