diff options
Diffstat (limited to 'opcode.c')
-rw-r--r-- | opcode.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -3,13 +3,14 @@ | |||
3 | ** TecCGraf - PUC-Rio | 3 | ** TecCGraf - PUC-Rio |
4 | */ | 4 | */ |
5 | 5 | ||
6 | char *rcs_opcode="$Id: opcode.c,v 4.14 1997/06/23 18:27:53 roberto Exp roberto $"; | 6 | char *rcs_opcode="$Id: opcode.c,v 4.15 1997/06/26 21:40:57 roberto Exp roberto $"; |
7 | 7 | ||
8 | #include <setjmp.h> | 8 | #include <setjmp.h> |
9 | #include <stdio.h> | 9 | #include <stdio.h> |
10 | #include <string.h> | 10 | #include <string.h> |
11 | #include <stdlib.h> | 11 | #include <stdlib.h> |
12 | 12 | ||
13 | #include "lualoc.h" | ||
13 | #include "luadebug.h" | 14 | #include "luadebug.h" |
14 | #include "luamem.h" | 15 | #include "luamem.h" |
15 | #include "opcode.h" | 16 | #include "opcode.h" |
@@ -1027,7 +1028,7 @@ static void comparison (lua_Type ttype_less, lua_Type ttype_equal, | |||
1027 | if (ttype(l) == LUA_T_NUMBER && ttype(r) == LUA_T_NUMBER) | 1028 | if (ttype(l) == LUA_T_NUMBER && ttype(r) == LUA_T_NUMBER) |
1028 | result = (nvalue(l) < nvalue(r)) ? -1 : (nvalue(l) == nvalue(r)) ? 0 : 1; | 1029 | result = (nvalue(l) < nvalue(r)) ? -1 : (nvalue(l) == nvalue(r)) ? 0 : 1; |
1029 | else if (ttype(l) == LUA_T_STRING && ttype(r) == LUA_T_STRING) | 1030 | else if (ttype(l) == LUA_T_STRING && ttype(r) == LUA_T_STRING) |
1030 | result = strcmp(svalue(l), svalue(r)); | 1031 | result = strcoll(svalue(l), svalue(r)); |
1031 | else { | 1032 | else { |
1032 | call_binTM(op, "unexpected type at comparison"); | 1033 | call_binTM(op, "unexpected type at comparison"); |
1033 | return; | 1034 | return; |