Skip to content

Commit

Permalink
Fixed logic in error reporting on ambiguous function calls.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 11, 2011
1 parent 6dd5eac commit d3f7898
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mojoshader_compiler.c
Expand Up @@ -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
Expand Down

0 comments on commit d3f7898

Please sign in to comment.