Permalink
Browse files

Fix for bug in parser when headers contain multibyte unicode.

git-svn-id: http://svn.macosforge.org/repository/ruby/ControlTower/trunk@4242 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
1 parent ca8da0f commit 47e45c4f1e5173c6aa1fcd0e0e6b67f64f03a6f5 @jballanc jballanc committed Jun 18, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 ext/CTParser/CTParser.m
View
@@ -143,7 +143,7 @@ - (void)reset
- (NSNumber *)parseData:(NSString *)dataBuf forEnvironment:(NSMutableDictionary *)env startingAt:(NSNumber *)startingPos
{
const char *data = [dataBuf UTF8String];
- size_t length = [dataBuf length];
+ size_t length = [dataBuf lengthOfBytesUsingEncoding: NSUTF8StringEncoding];
size_t offset = [startingPos unsignedLongValue];
_parser->data = env;

0 comments on commit 47e45c4

Please sign in to comment.