aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPDataCellFormatter.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-03-08 01:08:32 +0000
committerrowanbeentje <rowan@beent.je>2011-03-08 01:08:32 +0000
commit2a9b0987450a7dd60e824a9067c8aa8fd3d1ee5c (patch)
treebc4d83fe70582142fea71fd2465da88ebe725fb4 /Source/SPDataCellFormatter.m
parentcd06fc0c9c3713f12394a02f148158b4422b4aed (diff)
downloadsequelpro-2a9b0987450a7dd60e824a9067c8aa8fd3d1ee5c.tar.gz
sequelpro-2a9b0987450a7dd60e824a9067c8aa8fd3d1ee5c.tar.bz2
sequelpro-2a9b0987450a7dd60e824a9067c8aa8fd3d1ee5c.zip
Fix more compiler warnings, including a few bugs
Diffstat (limited to 'Source/SPDataCellFormatter.m')
-rw-r--r--Source/SPDataCellFormatter.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/SPDataCellFormatter.m b/Source/SPDataCellFormatter.m
index 0180227b..29b22cd7 100644
--- a/Source/SPDataCellFormatter.m
+++ b/Source/SPDataCellFormatter.m
@@ -65,13 +65,13 @@
return YES;
// A single character over the length of the string - likely typed. Prevent the change.
- if ([partialString length] == textLimit + 1) {
+ if ((NSInteger)[partialString length] == textLimit + 1) {
[SPTooltip showWithObject:[NSString stringWithFormat:NSLocalizedString(@"Maximum text length is set to %ld.", @"Maximum text length is set to %ld."), (long)textLimit]];
return NO;
}
// If the string is considerably longer than the limit, likely pasted. Accept but truncate.
- if ([partialString length] > textLimit) {
+ if ((NSInteger)[partialString length] > textLimit) {
[SPTooltip showWithObject:[NSString stringWithFormat:NSLocalizedString(@"Maximum text length is set to %ld. Inserted text was truncated.", @"Maximum text length is set to %ld. Inserted text was truncated."), (long)textLimit]];
*newString = [NSString stringWithString:[partialString substringToIndex:textLimit]];
return NO;