diff --git a/app/src/main/cpp/PhoneDevice.cpp b/app/src/main/cpp/PhoneDevice.cpp index b918767f..f06c8db7 100644 --- a/app/src/main/cpp/PhoneDevice.cpp +++ b/app/src/main/cpp/PhoneDevice.cpp @@ -1592,8 +1592,10 @@ bool CPhoneDevice::OnImageReady(cv::Mat& mat) if (mPhotoInfo.retries < (DEFAULT_TAKE_PHOTO_RETRIES - 1)) { shouldRetry = true; + char presetBuf[16] = { 0 }; + snprintf(presetBuf, sizeof(presetBuf), "%02X", mPhotoInfo.retries); // replaceAll(fullPath, ".jpg", std::string("-") + std::to_string(mPhotoInfo.retries) + ".jpg"); - replaceAll(fullPath, "_FF_", std::string("_") + std::to_string(mPhotoInfo.retries) + std::string("_")); + replaceAll(fullPath, "_FF_", std::string("_") + presetBuf + std::string("_")); XYLOG(XYLOG_SEVERITY_ERROR, "Photo is TOO dark or light(LDR=%u), will RETRY it", (uint32_t)captureResult.avgY); }