Commit b2757fc4 by Brent Gulanowski

Fix bug in OptionValue equality testing.

parent 7c8da3a2
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
- (BOOL)isEqualToOptionValue:(BUYOptionValue *)other - (BOOL)isEqualToOptionValue:(BUYOptionValue *)other
{ {
return [other isKindOfClass:[self class]] && [self.name isEqual:other.name] && [self.optionId isEqual:other.optionId]; return [other isKindOfClass:[self class]] && [self.name isEqual:other.name] && [self.value isEqual:other.value];
} }
#if !defined CORE_DATA_PERSISTENCE #if !defined CORE_DATA_PERSISTENCE
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
- (NSUInteger)hash - (NSUInteger)hash
{ {
NSUInteger hash = self.name.hash; NSUInteger hash = self.name.hash;
return ((hash << 5) + hash) + self.optionId.hash; return ((hash << 5) + hash) + self.value.hash;
} }
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment