From e42ab3908db7ea70320d780344723846227ab699 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Fri, 2 Sep 2016 21:01:03 +0200 Subject: reverse: print value in file offset panic --- internal/contentenc/offsets.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'internal/contentenc') diff --git a/internal/contentenc/offsets.go b/internal/contentenc/offsets.go index e331d55..61939a9 100644 --- a/internal/contentenc/offsets.go +++ b/internal/contentenc/offsets.go @@ -1,6 +1,8 @@ package contentenc import ( + "log" + "github.com/rfjakob/gocryptfs/internal/tlog" ) @@ -14,7 +16,7 @@ func (be *ContentEnc) PlainOffToBlockNo(plainOffset uint64) uint64 { // get the block number at cipher-text offset func (be *ContentEnc) CipherOffToBlockNo(cipherOffset uint64) uint64 { if cipherOffset < HEADER_LEN { - panic("BUG: offset is inside the file header") + log.Panicf("BUG: offset %d is inside the file header", cipherOffset) } return (cipherOffset - HEADER_LEN) / be.cipherBS } -- cgit v1.2.3