Disallow the use of 'any' as repository architecture

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40430 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Oliver Tappe 2011-02-10 19:40:38 +00:00
parent d136bfb173
commit 129e6b943f

View File

@ -136,6 +136,8 @@ BRepositoryInfo::SetTo(const BMessage* data)
result = data->FindUInt8(kArchitectureField, (uint8*)&fArchitecture);
if (result != B_OK)
return result;
if (fArchitecture == B_PACKAGE_ARCHITECTURE_ANY)
return B_BAD_DATA;
const char* licenseName;
const char* licenseText;
@ -207,7 +209,7 @@ BRepositoryInfo::SetTo(const BEntry& entry)
BPackageArchitecture architecture;
if (BPackageInfo::GetArchitectureByName(architectureString, architecture)
!= B_OK) {
!= B_OK || architecture == B_PACKAGE_ARCHITECTURE_ANY) {
return B_BAD_DATA;
}