Browse code

Set lvl & param_offset[lvl] & param_offset[lvl+1] before FIXUP call of resolved select function

Michal Matyska authored on 21/06/2006 21:36:52
Showing 1 changed files
... ...
@@ -243,12 +243,10 @@ int resolve_select(select_t* s)
243 243
 				goto not_found;
244 244
 			}
245 245
 		}
246
-		if (t->table[table_idx].flags & FIXUP_CALL) {
247
-			if (t->table[table_idx].new_f(NULL, s, NULL)<0) goto not_found;
248
-		}
249 246
 
250 247
 		if (t->table[table_idx].flags & NESTED) {
251 248
 			if (nested < MAX_NESTED_CALLS-1) { /* need space for final function */
249
+				s->lvl = nested;
252 250
 				s->f[nested++] = f;
253 251
 				s->param_offset[nested] = param_idx+1;
254 252
 			} else {
... ...
@@ -258,6 +256,11 @@ int resolve_select(select_t* s)
258 256
 		} else {
259 257
 			param_idx++;
260 258
 		}
259
+
260
+		if (t->table[table_idx].flags & FIXUP_CALL) {
261
+			if (t->table[table_idx].new_f(NULL, s, NULL)<0) goto not_found;
262
+		}
263
+
261 264
 		f = t->table[table_idx].new_f;
262 265
 	}
263 266