fixup std::min usage with strings, when saving images

I think this should fix the error reported by Pentarctagon here,
at the very end of his log.

http://forums.wesnoth.org/viewtopic.php?f=4&t=41018&start=15#p577053
This commit is contained in:
Chris Beck 2014-10-23 20:09:14 -04:00
parent 635949f313
commit 88ed44b374

View file

@ -583,8 +583,10 @@ bool game_launcher::play_render_image_mode()
return false;
}
std::string outfile = cmdline_opts_.render_image->substr(0, std::min(8ul,cmdline_opts_.render_image->length())) + ".bmp";
// A default output filename
std::string outfile = "wesnoth_image.bmp";
// If a output path was given as an argument, use that instead
if (cmdline_opts_.render_image_dst) {
outfile = *cmdline_opts_.render_image_dst;
}