File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ void invoke_context::format_error(
107
107
108
108
if (candidate_index == 0 )
109
109
{
110
+ int stacksize = lua_gettop (L);
110
111
lua_pushstring (L, " No matching overload found, candidates:\n " );
111
112
int count = 0 ;
112
113
for (function_object const * f = overloads; f != 0 ; f = f->next )
@@ -116,19 +117,20 @@ void invoke_context::format_error(
116
117
f->format_signature (L, function_name);
117
118
++count;
118
119
}
119
- lua_concat (L, count * 2 + 1 );
120
+ lua_concat (L, lua_gettop (L) - stacksize );
120
121
}
121
122
else
122
123
{
123
124
// Ambiguous
125
+ int stacksize = lua_gettop (L);
124
126
lua_pushstring (L, " Ambiguous, candidates:\n " );
125
127
for (int i = 0 ; i < candidate_index; ++i)
126
128
{
127
129
if (i != 0 )
128
130
lua_pushstring (L, " \n " );
129
131
candidates[i]->format_signature (L, function_name);
130
132
}
131
- lua_concat (L, candidate_index * 2 );
133
+ lua_concat (L, lua_gettop (L) - stacksize );
132
134
}
133
135
}
134
136
You can’t perform that action at this time.
0 commit comments