summaryrefslogtreecommitdiff
path: root/lauxlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-08-16 09:51:54 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2019-08-16 09:51:54 -0300
commitca13be9af784b7288d3a07d9b5bccb329086e885 (patch)
treec027419f98064d681518a4130439920a13a11b06 /lauxlib.c
parenta1d8eb27431c02c4529be1efd92143ad65434f3a (diff)
downloadlua-github-ca13be9af784b7288d3a07d9b5bccb329086e885.tar.gz
Supressed errors in '__close' generate warnings
Diffstat (limited to 'lauxlib.c')
-rw-r--r--lauxlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lauxlib.c b/lauxlib.c
index ba1980b7..014e7052 100644
--- a/lauxlib.c
+++ b/lauxlib.c
@@ -1010,9 +1010,9 @@ static int panic (lua_State *L) {
static void warnf (void *ud, const char *message, int tocont) {
int *warnstate = (int *)ud;
if (*warnstate != 2 && !tocont && *message == '@') { /* control message? */
- if (strcmp(message + 1, "off") == 0)
+ if (strcmp(message, "@off") == 0)
*warnstate = 0;
- else if (strcmp(message + 1, "on") == 0)
+ else if (strcmp(message, "@on") == 0)
*warnstate = 1;
return;
}