summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-10-20 14:41:44 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-10-20 14:41:44 +0000
commit487d7faaa8d789507b901cead8d7803c98af2bd3 (patch)
tree3a0aee43a1f51f01caf8965eacfa6ad6132e33cc
parentf732cca1a45def35db5f88444b22c1485125bfde (diff)
* fix a off-by-one error when showing the description
-rw-r--r--cmdline/apt-cache.cc2
1 files changed, 1 insertions, 1 deletions
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;