aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-04-03 10:20:33 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2000-04-03 10:20:33 -0300
commite30327728ca4efc3fb8591cf3ea0b65cafbd907a (patch)
tree752be896712fd2b84be6fd6b48904319a48a3c19
parent36e1390631a4b89f0a8a3111978780de0d53466c (diff)
downloadlua-e30327728ca4efc3fb8591cf3ea0b65cafbd907a.tar.gz
lua-e30327728ca4efc3fb8591cf3ea0b65cafbd907a.tar.bz2
lua-e30327728ca4efc3fb8591cf3ea0b65cafbd907a.zip
BUG: tostring() without arguments gives seg. fault.
-rw-r--r--bugs10
-rw-r--r--lbuiltin.c4
2 files changed, 12 insertions, 2 deletions
diff --git a/bugs b/bugs
index a3a0ec5f..5aa30736 100644
--- a/bugs
+++ b/bugs
@@ -143,3 +143,13 @@ Thu Mar 2 09:41:53 EST 2000
143>> lua_settable should check stack space (it could call a T.M.) 143>> lua_settable should check stack space (it could call a T.M.)
144(by lhf & celes; since 3.2; it was already fixed by fixed stack) 144(by lhf & celes; since 3.2; it was already fixed by fixed stack)
145 145
146** lparser.c
147Mon Apr 3 09:59:06 EST 2000
148>> '%' should be in expfollow
149(by Edgar Toernig; since 3.1; it was already fixed)
150
151** lbuiltin.c
152Mon Apr 3 10:05:05 EST 2000
153>> tostring() without arguments gives seg. fault.
154(by Edgar Toernig; since 3.0)
155
diff --git a/lbuiltin.c b/lbuiltin.c
index 8bd20248..a10ce99e 100644
--- a/lbuiltin.c
+++ b/lbuiltin.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbuiltin.c,v 1.99 2000/03/27 20:10:21 roberto Exp roberto $ 2** $Id: lbuiltin.c,v 1.100 2000/03/29 20:19:20 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*/
@@ -371,7 +371,7 @@ void luaB_next (lua_State *L) {
371 371
372 372
373void luaB_tostring (lua_State *L) { 373void luaB_tostring (lua_State *L) {
374 lua_Object o = lua_getparam(L, 1); 374 lua_Object o = luaL_nonnullarg(L, 1);
375 char buff[64]; 375 char buff[64];
376 switch (ttype(o)) { 376 switch (ttype(o)) {
377 case TAG_NUMBER: 377 case TAG_NUMBER: