From 8384ccbd1a51447dccbd608fc5df3c24cb8999b1 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Sat, 28 Jul 2012 22:06:09 +0200 Subject: [PATCH] Fix sign error in position calculation for mem_seek. * data-mem.c (mem_seek): Fix sign error in position calculation. --- src/data-mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data-mem.c b/src/data-mem.c index eda695a4..512c295e 100644 --- a/src/data-mem.c +++ b/src/data-mem.c @@ -137,7 +137,7 @@ mem_seek (gpgme_data_t dh, off_t offset, int whence) gpg_err_set_errno (EINVAL); return -1; } - dh->data.mem.offset = dh->data.mem.length - offset; + dh->data.mem.offset = dh->data.mem.length + offset; break; default: gpg_err_set_errno (EINVAL);