diff options
Diffstat (limited to 'src/screenshot.cpp')
-rw-r--r-- | src/screenshot.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/screenshot.cpp b/src/screenshot.cpp index 0e3bf3d8e..6f42038da 100644 --- a/src/screenshot.cpp +++ b/src/screenshot.cpp @@ -34,7 +34,7 @@ static const char * const SCREENSHOT_NAME = "screenshot"; ///< Default filename of a saved screenshot. static const char * const HEIGHTMAP_NAME = "heightmap"; ///< Default filename of a saved heightmap. -char _screenshot_format_name[8]; ///< Extension of the current screenshot format (corresponds with #_cur_screenshot_format). +std::string _screenshot_format_name; ///< Extension of the current screenshot format (corresponds with #_cur_screenshot_format). uint _num_screenshot_formats; ///< Number of available screenshot formats. uint _cur_screenshot_format; ///< Index of the currently selected screenshot format in #_screenshot_formats. static char _screenshot_name[128]; ///< Filename of the screenshot file. @@ -584,7 +584,7 @@ void InitializeScreenshotFormats() { uint j = 0; for (uint i = 0; i < lengthof(_screenshot_formats); i++) { - if (!strcmp(_screenshot_format_name, _screenshot_formats[i].extension)) { + if (_screenshot_format_name.compare(_screenshot_formats[i].extension) != 0) { j = i; break; } |