Skip to content

Commit

Permalink
Fixing if condition
Browse files Browse the repository at this point in the history
  • Loading branch information
ruisebas committed Oct 20, 2022
1 parent f160509 commit 078d961
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AWSPinpoint/AWSPinpointEvent.m
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ - (void)addAttribute:(NSString *)theValue forKey:(NSString *)theKey {
if(!theKey) return;

@synchronized(self.attributes) {
if(self.attributes.count <= MAX_NUM_OF_METRICS_AND_ATTRIBUTES) {
if(self.attributes.count < MAX_NUM_OF_METRICS_AND_ATTRIBUTES) {
NSString* trimmedKey = [AWSPinpointEvent trimKey:theKey forType:@"attribute"];
NSString* trimmedValued = [AWSPinpointEvent trimValue:theValue];
[self.attributes setValue:trimmedValued forKey:trimmedKey];
Expand Down Expand Up @@ -155,7 +155,7 @@ - (void)addMetric:(NSNumber *)theValue forKey:(NSString *)theKey {
}

@synchronized(self.metrics) {
if(self.metrics.count <= MAX_NUM_OF_METRICS_AND_ATTRIBUTES) {
if(self.metrics.count < MAX_NUM_OF_METRICS_AND_ATTRIBUTES) {
NSString* trimmedKey = [AWSPinpointEvent trimKey:theKey forType:@"attribute"];
[self.metrics setValue:theValue forKey:trimmedKey];
} else {
Expand Down

0 comments on commit 078d961

Please sign in to comment.