]> git.saurik.com Git - apt.git/commitdiff
* fix a off-by-one error when showing the description
authorMichael Vogt <michael.vogt@ubuntu.com>
Thu, 20 Oct 2005 14:41:44 +0000 (14:41 +0000)
committerMichael Vogt <michael.vogt@ubuntu.com>
Thu, 20 Oct 2005 14:41:44 +0000 (14:41 +0000)
cmdline/apt-cache.cc

index 94cfab14f743ad10d20103b813fa74a9632c73a4..810dbe7b021d8d07747a739372c74442ba226ce7 100644 (file)
@@ -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;