From cd2620a2a3455a127d938819a673c3bc1c97d612 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 18 Jun 2019 20:13:25 -0700 Subject: buffers: bug: wrong object in format arguments. * buf.c (buf_strm_seek): index is a BSD function; we want to refer to the local variable npos here. This was fortuitiously caught by GNU C++ which is obtains multiple overloaded declarations of index from somewhere, and so in this variable argument list situation thinks that there isn't enough context to resolve the overload. --- buf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'buf.c') diff --git a/buf.c b/buf.c index ce196976..349f0870 100644 --- a/buf.c +++ b/buf.c @@ -937,7 +937,7 @@ static val buf_strm_seek(val stream, val offset, enum strm_whence whence) if (minusp(npos)) uw_throwf(error_s, lit("~a: cannot seek to negative position ~s"), - self, index, nao); + self, npos, nao); s->pos = npos; return t; -- cgit v1.2.3