Skip to content

Commit 59b6430

Browse files
committed
bugfix: LuaJIT sets currentline to -1 if it is unavailable.
1 parent a38d906 commit 59b6430

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ngx_http_lua_log.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ log_wrapper(ngx_log_t *log, const char *ident, ngx_uint_t level,
194194
*p++ = ':';
195195

196196
p = ngx_snprintf(p, NGX_INT_T_LEN, "%d",
197-
ar.currentline ? ar.currentline : ar.linedefined);
197+
ar.currentline > 0 ? ar.currentline : ar.linedefined);
198198

199199
*p++ = ':'; *p++ = ' ';
200200

0 commit comments

Comments
 (0)