diff options
Diffstat (limited to 'lbuiltin.c')
-rw-r--r-- | lbuiltin.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbuiltin.c,v 1.90 1999/12/28 19:23:41 roberto Exp roberto $ | 2 | ** $Id: lbuiltin.c,v 1.91 1999/12/30 18:27:03 roberto Exp roberto $ |
3 | ** Built-in functions | 3 | ** Built-in functions |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -541,10 +541,9 @@ static int sort_comp (lua_State *L, lua_Object f, const TObject *a, | |||
541 | luaD_call(L, L->top-3, 1); | 541 | luaD_call(L, L->top-3, 1); |
542 | } | 542 | } |
543 | else { /* a < b? */ | 543 | else { /* a < b? */ |
544 | *(L->top) = *a; | 544 | *(L->top++) = *a; |
545 | *(L->top+1) = *b; | 545 | *(L->top++) = *b; |
546 | luaV_comparison(L, L->top+2, LUA_T_NUMBER, LUA_T_NIL, LUA_T_NIL, IM_LT); | 546 | luaV_comparison(L); |
547 | L->top++; /* result of comparison */ | ||
548 | } | 547 | } |
549 | return ttype(--(L->top)) != LUA_T_NIL; | 548 | return ttype(--(L->top)) != LUA_T_NIL; |
550 | } | 549 | } |