mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +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
6bd35653c9
commit
b691462713
1 changed files with 4 additions and 0 deletions
|
@ -736,6 +736,10 @@ static BOOL double_release_check_enabled = NO;
|
|||
|
||||
+ 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);
|
||||
return self;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue