From 9ba335f91ed4feb984bd7b6ae3497c36b8fe947a Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Tue, 14 Jan 2025 01:11:19 +0900 Subject: [PATCH] [qfcc] Use maximum cost for non-matching param counts I had missed this so such cases wound up with a cost of 0 resulting in bogusly ambiguous function calls (or possibly worse). --- tools/qfcc/source/function.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/qfcc/source/function.c b/tools/qfcc/source/function.c index d627b817a..6572dd0e0 100644 --- a/tools/qfcc/source/function.c +++ b/tools/qfcc/source/function.c @@ -677,6 +677,7 @@ find_generic_function (genfunc_t **genfuncs, const expr_t *fexpr, for (int j = 0; j < num_funcs; j++) { auto g = genfuncs[j]; if (g->num_params != num_params) { + costs[j] = ~0u; continue; } const type_t *types[g->num_types] = {};