diff options
Diffstat (limited to 'src/screenshot.cpp')
-rw-r--r-- | src/screenshot.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/screenshot.cpp b/src/screenshot.cpp index 799be36d2..6882e0905 100644 --- a/src/screenshot.cpp +++ b/src/screenshot.cpp @@ -718,12 +718,12 @@ static const char *MakeScreenshotName(const char *default_fn, const char *ext, b /* Add extension to screenshot file */ size_t len = strlen(_screenshot_name); - snprintf(&_screenshot_name[len], lengthof(_screenshot_name) - len, ".%s", ext); + seprintf(&_screenshot_name[len], lastof(_screenshot_name), ".%s", ext); const char *screenshot_dir = crashlog ? _personal_dir : FiosGetScreenshotDir(); for (uint serial = 1;; serial++) { - if (snprintf(_full_screenshot_name, lengthof(_full_screenshot_name), "%s%s", screenshot_dir, _screenshot_name) >= (int)lengthof(_full_screenshot_name)) { + if (seprintf(_full_screenshot_name, lastof(_full_screenshot_name), "%s%s", screenshot_dir, _screenshot_name) >= (int)lengthof(_full_screenshot_name)) { /* We need more characters than MAX_PATH -> end with error */ _full_screenshot_name[0] = '\0'; break; @@ -731,7 +731,7 @@ static const char *MakeScreenshotName(const char *default_fn, const char *ext, b if (!generate) break; // allow overwriting of non-automatic filenames if (!FileExists(_full_screenshot_name)) break; /* If file exists try another one with same name, but just with a higher index */ - snprintf(&_screenshot_name[len], lengthof(_screenshot_name) - len, "#%u.%s", serial, ext); + seprintf(&_screenshot_name[len], lastof(_screenshot_name) - len, "#%u.%s", serial, ext); } return _full_screenshot_name; |