Skip to content

Commit 68add1e

Browse files
committed
src/openssl.c: line number doesn't need to take up room in the prefix buffer
1 parent 49e746e commit 68add1e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/openssl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1495,15 +1495,15 @@ static const char *auxL_pusherror(lua_State *L, int error, const char *fun) {
14951495
}
14961496

14971497
if (fun) {
1498-
snprintf(prefix, sizeof prefix, "%s: %s:%d", fun, file, line);
1498+
snprintf(prefix, sizeof prefix, "%s: %s:%s", fun, file);
14991499
} else {
1500-
snprintf(prefix, sizeof prefix, "%s:%d", file, line);
1500+
snprintf(prefix, sizeof prefix, "%s:%s", file);
15011501
}
15021502

15031503
ERR_error_string_n(code, txt, sizeof txt);
15041504
ERR_clear_error();
15051505

1506-
return lua_pushfstring(L, "%s:%s", prefix, txt);
1506+
return lua_pushfstring(L, "%s:%d:%s", prefix, line, txt);
15071507
#if HAVE_DLADDR
15081508
} else if (error == auxL_EDYLD) {
15091509
const char *const fmt = (fun)? "%s: %s" : "%.0s%s";

0 commit comments

Comments
 (0)