summaryrefslogtreecommitdiffstats
path: root/buf.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-06-18 20:13:25 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-06-18 20:13:25 -0700
commitcd2620a2a3455a127d938819a673c3bc1c97d612 (patch)
tree2bb7651a5c3b51d7cceb1dcc84ab99f8975e3589 /buf.c
parentc6a27b9a8866dcc61c4b7859aac547859b80decd (diff)
downloadtxr-cd2620a2a3455a127d938819a673c3bc1c97d612.tar.gz
txr-cd2620a2a3455a127d938819a673c3bc1c97d612.tar.bz2
txr-cd2620a2a3455a127d938819a673c3bc1c97d612.zip
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.
Diffstat (limited to 'buf.c')
-rw-r--r--buf.c2
1 files changed, 1 insertions, 1 deletions
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;