From d3f7898b0a9129d1f212e899651a22cf3f4efb14 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 10 Feb 2011 22:20:04 -0500 Subject: [PATCH] Fixed logic in error reporting on ambiguous function calls. --- mojoshader_compiler.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mojoshader_compiler.c b/mojoshader_compiler.c index fbf00324..ec10601c 100644 --- a/mojoshader_compiler.c +++ b/mojoshader_compiler.c @@ -2365,11 +2365,12 @@ static const MOJOSHADER_astDataType *match_func_to_call(Context *ctx, if (this_match) { - if (match++ == 0) + match++; + if (match == 1) best = item; else { - if (match++ == 1) + if (match == 2) failf(ctx, "Ambiguous function call to '%s'", sym); // !!! FIXME: list each possible function in a fail() here. } // else