Permalink
Browse files

Use getCharacters:range: instead of getCharacters:

  • Loading branch information...
1 parent e48b8ca commit fc8e0578399493402944a988f5005e826caacff4 @psychs psychs committed May 10, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/TwitterText.m
View
@@ -613,7 +613,7 @@ + (int)tweetLength:(NSString*)text
// Adjust count for non-BMP characters
UniChar buffer[len];
- [text getCharacters:buffer];
+ [text getCharacters:buffer range:NSMakeRange(0, len)];
int charCount = len;
for (int i=0; i<len; i++) {
@@ -671,7 +671,7 @@ + (int)remainingCharacterCount:(NSString*)text httpURLLength:(int)httpURLLength
if (len > 0) {
// Adjust count for non-BMP characters
UniChar buffer[len];
- [string getCharacters:buffer];
+ [string getCharacters:buffer range:NSMakeRange(0, len)];
for (int i=0; i<len; i++) {
UniChar c = buffer[i];

0 comments on commit fc8e057

Please sign in to comment.