X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/c5ca2c52a98fcb50de6429cf370ed5b6b7602a00..f1828b6977972b4ef6da6401602b7938f6570c32:/apt-pkg/sourcelist.cc diff --git a/apt-pkg/sourcelist.cc b/apt-pkg/sourcelist.cc index 47800b0c2..0fddfb451 100644 --- a/apt-pkg/sourcelist.cc +++ b/apt-pkg/sourcelist.cc @@ -8,15 +8,19 @@ ##################################################################### */ /*}}}*/ // Include Files /*{{{*/ +#include + #include #include #include #include #include - -#include +#include +#include #include + +#include /*}}}*/ using namespace std; @@ -29,7 +33,7 @@ unsigned long pkgSourceList::Type::GlobalListLen = 0; // Type::Type - Constructor /*{{{*/ // --------------------------------------------------------------------- /* Link this to the global list of items*/ -pkgSourceList::Type::Type() +pkgSourceList::Type::Type() : Name(NULL), Label(NULL) { ItmList[GlobalListLen] = this; GlobalListLen++; @@ -266,7 +270,7 @@ bool pkgSourceList::ReadAppend(string File) // CNC:2003-02-20 - Do not break if '#' is inside []. for (I = Buffer; *I != 0 && *I != '#'; I++) if (*I == '[') - for (I++; *I != 0 && *I != ']'; I++); + I = strchr(I + 1, ']'); *I = 0; const char *C = _strstrip(Buffer);