mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 12:16:40 +00:00
Don't permit negative versions.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3048 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f7c949afaa
commit
e1dfb5b44f
1 changed files with 4 additions and 0 deletions
|
@ -736,6 +736,10 @@ static BOOL double_release_check_enabled = NO;
|
||||||
|
|
||||||
+ setVersion:(int)aVersion
|
+ setVersion:(int)aVersion
|
||||||
{
|
{
|
||||||
|
if (aVersion < 0)
|
||||||
|
[NSException raise: NSInvalidArgumentException
|
||||||
|
format: @"%s +setVersion: may not set a negative version",
|
||||||
|
object_get_class_name(self)];
|
||||||
class_set_version(self, aVersion);
|
class_set_version(self, aVersion);
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue