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:
parent
635949f313
commit
88ed44b374
1 changed files with 3 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue