diff options
| author | Jakob Unterwurzacher | 2016-09-02 21:01:03 +0200 | 
|---|---|---|
| committer | Jakob Unterwurzacher | 2016-09-25 16:43:17 +0200 | 
| commit | e42ab3908db7ea70320d780344723846227ab699 (patch) | |
| tree | 75539a5fde60247740b5012f4bbec0b1ab75467f | |
| parent | a34b447ad1e6d4eea4adecddb9198f659d19aeeb (diff) | |
reverse: print value in file offset panic
| -rw-r--r-- | internal/contentenc/offsets.go | 4 | 
1 files changed, 3 insertions, 1 deletions
| 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  } | 
