aboutsummaryrefslogtreecommitdiff
path: root/lbaselib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lbaselib.c')
-rw-r--r--lbaselib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lbaselib.c b/lbaselib.c
index 44dc38e5..6ec951ca 100644
--- a/lbaselib.c
+++ b/lbaselib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbaselib.c,v 1.24 2001/02/20 18:29:54 roberto Exp roberto $ 2** $Id: lbaselib.c,v 1.25 2001/02/22 17:15:18 roberto Exp roberto $
3** Basic library 3** Basic library
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -447,7 +447,7 @@ static int luaB_tremove (lua_State *L) {
447 luaL_checktype(L, 1, LUA_TTABLE); 447 luaL_checktype(L, 1, LUA_TTABLE);
448 n = lua_getn(L, 1); 448 n = lua_getn(L, 1);
449 pos = luaL_opt_int(L, 2, n); 449 pos = luaL_opt_int(L, 2, n);
450 if (n <= 0) return 0; /* table is "empty" */ 450 if (n <= 0) return 0; /* table is `empty' */
451 lua_rawgeti(L, 1, pos); /* result = t[pos] */ 451 lua_rawgeti(L, 1, pos); /* result = t[pos] */
452 for ( ;pos<n; pos++) { 452 for ( ;pos<n; pos++) {
453 lua_rawgeti(L, 1, pos+1); 453 lua_rawgeti(L, 1, pos+1);
@@ -545,7 +545,7 @@ static void auxsort (lua_State *L, int l, int u) {
545 lua_rawgeti(L, 1, i); 545 lua_rawgeti(L, 1, i);
546 set2(L, u-1, i); /* swap pivot (a[u-1]) with a[i] */ 546 set2(L, u-1, i); /* swap pivot (a[u-1]) with a[i] */
547 /* a[l..i-1] <= a[i] == P <= a[i+1..u] */ 547 /* a[l..i-1] <= a[i] == P <= a[i+1..u] */
548 /* adjust so that smaller "half" is in [j..i] and larger one in [l..u] */ 548 /* adjust so that smaller half is in [j..i] and larger one in [l..u] */
549 if (i-l < u-i) { 549 if (i-l < u-i) {
550 j=l; i=i-1; l=i+2; 550 j=l; i=i-1; l=i+2;
551 } 551 }