Free fork of NotProton: Windows Steam games in Mac Steam, on CodeWeavers' Wine and Apple's Game Porting Toolkit
Swift apple-silicond3dmetaldxmtdxvkgame-porting-toolkitgptkmac-gamingmacosmetalfxrosetta-2steamsteam-playwinewinecx
Fix the anchor check (could pass when no database matches the Steam build)
NotProtonNot93d1271e7293
diff --git a/Makefile b/Makefileindex 8b58f7f..da08415 100644--- a/Makefile+++ b/Makefile@@ -60,7 +60,7 @@ DEPS := $(OBJS:.o=.d)tests-list overlay-shim overlay-shim-install overlay-shim-tests \overlay-shim-bench iconmaker icon \appinfo helpers-install ntdll-resolve bridge runcheck compatcheck \- compatsvc-check scriptcheck+ compatsvc-check scriptcheck FORCEAPP_PAYLOAD := app/Sources/NotProtonApp/Resources/payload@@ -130,7 +130,7 @@ ANCHORCHECK_SRCS := dylib/tests/anchorcheck.c \dylib/resolver/resolver.c dylib/resolver/sigdb.c \dylib/util/log.c dylib/util/file.c vendor/cJSON.c-$(ANCHORCHECK): $(ANCHORCHECK_SRCS)+$(ANCHORCHECK): $(ANCHORCHECK_SRCS) FORCE@mkdir -p $(dir $@)$(CC) -arch $(ARCH) -mmacosx-version-min=$(MIN_VER) -std=c17 -g -O1 \-Wall -Wextra -Wno-unused-parameter -Idylib -Ivendor \@@ -542,3 +542,5 @@ clean:rebuild: clean all-include $(DEPS)++FORCE:diff --git a/dylib/tests/anchorcheck.c b/dylib/tests/anchorcheck.cindex e7a44c7..2b27933 100644--- a/dylib/tests/anchorcheck.c+++ b/dylib/tests/anchorcheck.c@@ -316,7 +316,7 @@ static int pick_live(const dbcheck_t *dbs, int n) {return best_hits ? best : -1;}-static int report_db(const dbcheck_t *db, int is_live) {+static int report_db(const dbcheck_t *db, int is_live, int misses_excused) {int bad = 0;printf("%s build %llu%s\n", db->path, (unsigned long long)db->build,@@ -330,7 +330,7 @@ static int report_db(const dbcheck_t *db, int is_live) {else if (!r->anchor) { verdict = (r->has_pattern && r->aob)? "ANCHOR FAILED (aob resolves)": "ANCHOR FAILED";- if (is_live) bad++; }+ if (!misses_excused) bad++; }else if (!is_live) { verdict = (r->has_pattern && r->aob && r->aob != r->anchor)? "stale pattern hit elsewhere": "resolved"; }@@ -423,7 +423,7 @@ int main(int argc, char **argv) {int live = pick_live(dbs, n);int bad = 0;- for (int i = 0; i < n; i++) bad += report_db(&dbs[i], i == live);+ for (int i = 0; i < n; i++) bad += report_db(&dbs[i], i == live, live >= 0 && i != live);bad += report_cross_db(dbs, n);if (live < 0) {