summaryrefslogtreecommitdiff
path: root/ldebug.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-04-26 13:03:50 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-04-26 13:03:50 -0300
commit4abe99dc341b2ec0cb59b8fa95006e9781938eed (patch)
tree93f9f9314d5fe985d79edd36741be97e7bf2b162 /ldebug.c
parentd4e6b750983febf3af0f09235169be9a9e9250d8 (diff)
downloadlua-4abe99dc341b2ec0cb59b8fa95006e9781938eed.tar.gz
lua-4abe99dc341b2ec0cb59b8fa95006e9781938eed.tar.bz2
lua-4abe99dc341b2ec0cb59b8fa95006e9781938eed.zip
new interface for 'tonumber'
Diffstat (limited to 'ldebug.c')
-rw-r--r--ldebug.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ldebug.c b/ldebug.c
index 96d47085..478c642e 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldebug.c,v 2.91 2013/04/25 15:59:42 roberto Exp roberto $ 2** $Id: ldebug.c,v 2.92 2013/04/26 13:07:53 roberto Exp roberto $
3** Debug Interface 3** Debug Interface
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -525,8 +525,8 @@ l_noret luaG_concaterror (lua_State *L, StkId p1, StkId p2) {
525 525
526 526
527l_noret luaG_aritherror (lua_State *L, const TValue *p1, const TValue *p2) { 527l_noret luaG_aritherror (lua_State *L, const TValue *p1, const TValue *p2) {
528 TValue temp; 528 lua_Number temp;
529 if (luaV_tonumber(p1, &temp) == NULL) 529 if (!tonumber(p1, &temp))
530 p2 = p1; /* first operand is wrong */ 530 p2 = p1; /* first operand is wrong */
531 luaG_typeerror(L, p2, "perform arithmetic on"); 531 luaG_typeerror(L, p2, "perform arithmetic on");
532} 532}