diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index 7d2d79f459..4c2c1a85c8 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp @@ -1629,7 +1629,7 @@ JNIEXPORT jobjectArray JNICALL Java_org_yuzu_yuzu_1emu_NativeLibrary_checkForUpd UpdateChecker::GetLatestRelease(is_prerelease); #ifdef NIGHTLY_BUILD - if (release->tag.substr(release->tag.find('.') + 1, 10) == std::string(Common::g_build_version).substr(0, 10)) { + if (!release || ::strnstr(release->tag.c_str(), Common::g_build_version, 10) != nullptr) { return nullptr; } #else diff --git a/src/yuzu/main_window.cpp b/src/yuzu/main_window.cpp index ed0f686ac7..72001890e3 100644 --- a/src/yuzu/main_window.cpp +++ b/src/yuzu/main_window.cpp @@ -524,7 +524,7 @@ MainWindow::MainWindow(bool has_broken_vulkan) const std::optional latest_release_tag = UpdateChecker::GetLatestRelease(is_prerelease); #ifdef NIGHTLY_BUILD - if (latest_release_tag->tag.substr(latest_release_tag->tag.find('.') + 1, 10) != std::string(Common::g_build_version).substr(0, 10)) { + if (latest_release_tag && ::strnstr(latest_release_tag->tag.c_str(), Common::g_build_version, 10) != nullptr) { return latest_release_tag.value(); } #else