Browse Source

* fix a off-by-one error when showing the description

debian/1.8.y
Michael Vogt 17 years ago
parent
commit
487d7faaa8
  1. 2
      cmdline/apt-cache.cc

2
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;

Loading…
Cancel
Save