From d76b1a0eefc51384c75ffc0b847c212ad98f20f8 Mon Sep 17 00:00:00 2001
From: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Thu, 13 Apr 2000 15:08:18 -0300
Subject: `base' for `tonumber' must be >= 2.

---
 lbuiltin.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lbuiltin.c b/lbuiltin.c
index 9a0939fd..ccb739c0 100644
--- a/lbuiltin.c
+++ b/lbuiltin.c
@@ -1,5 +1,5 @@
 /*
-** $Id: lbuiltin.c,v 1.102 2000/04/04 20:49:32 roberto Exp roberto $
+** $Id: lbuiltin.c,v 1.103 2000/04/13 16:46:43 roberto Exp roberto $
 ** Built-in functions
 ** See Copyright Notice in lua.h
 */
@@ -166,7 +166,7 @@ void luaB_tonumber (lua_State *L) {
     const char *s1 = luaL_check_string(L, 1);
     char *s2;
     Number n;
-    luaL_arg_check(L, 0 <= base && base <= 36, 2, "base out of range");
+    luaL_arg_check(L, 2 <= base && base <= 36, 2, "base out of range");
     n = strtoul(s1, &s2, base);
     if (s1 != s2) {  /* at least one valid digit? */
       while (isspace((unsigned char)*s2)) s2++;  /* skip trailing spaces */
-- 
cgit v1.2.3-55-g6feb