aboutsummaryrefslogtreecommitdiff
path: root/ltm.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-11-21 10:15:57 -0200
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-11-21 10:15:57 -0200
commit5fbd40dbe5d6d3f7bd4717073eb2beacc8ebe7c9 (patch)
tree20b9b2cb5fe46d59dc97193429436d5110f23f8f /ltm.c
parent049cf14cf9f82a07387df4d0c9bdba5ba2fef22f (diff)
downloadlua-5fbd40dbe5d6d3f7bd4717073eb2beacc8ebe7c9.tar.gz
lua-5fbd40dbe5d6d3f7bd4717073eb2beacc8ebe7c9.tar.bz2
lua-5fbd40dbe5d6d3f7bd4717073eb2beacc8ebe7c9.zip
'x//y' extended to floats
Diffstat (limited to 'ltm.c')
-rw-r--r--ltm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ltm.c b/ltm.c
index 78d98dfc..5f1ba58d 100644
--- a/ltm.c
+++ b/ltm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ltm.c,v 2.31 2014/11/10 14:46:05 roberto Exp roberto $ 2** $Id: ltm.c,v 2.32 2014/11/10 17:24:43 roberto Exp roberto $
3** Tag methods 3** Tag methods
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -117,12 +117,12 @@ void luaT_trybinTM (lua_State *L, const TValue *p1, const TValue *p2,
117 switch (event) { 117 switch (event) {
118 case TM_CONCAT: 118 case TM_CONCAT:
119 luaG_concaterror(L, p1, p2); 119 luaG_concaterror(L, p1, p2);
120 case TM_IDIV: case TM_BAND: case TM_BOR: case TM_BXOR: 120 case TM_BAND: case TM_BOR: case TM_BXOR:
121 case TM_SHL: case TM_SHR: case TM_BNOT: { 121 case TM_SHL: case TM_SHR: case TM_BNOT: {
122 lua_Number dummy; 122 lua_Number dummy;
123 if (tonumber(p1, &dummy) && tonumber(p2, &dummy)) 123 if (tonumber(p1, &dummy) && tonumber(p2, &dummy))
124 luaG_tointerror(L, p1, p2); 124 luaG_tointerror(L, p1, p2);
125 else if (event != TM_IDIV) 125 else
126 luaG_opinterror(L, p1, p2, "perform bitwise operation on"); 126 luaG_opinterror(L, p1, p2, "perform bitwise operation on");
127 /* else go through */ 127 /* else go through */
128 } 128 }