From 487d7faaa8d789507b901cead8d7803c98af2bd3 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 20 Oct 2005 14:41:44 +0000 Subject: * fix a off-by-one error when showing the description --- cmdline/apt-cache.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index 94cfab14f..810dbe7b0 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -1229,7 +1229,7 @@ bool DisplayRecord(pkgCache::VerIterator V) const unsigned char *DescP = (unsigned char*)strstr((char*)Buffer, "Description:"); // Write all but Description - if (fwrite(Buffer,1,DescP - Buffer-1,stdout) < (size_t)(DescP - Buffer-1)) + if (fwrite(Buffer,1,DescP - Buffer,stdout) < (size_t)(DescP - Buffer)) { delete [] Buffer; return false; -- cgit v1.2.3