Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix capture name retrieval for multi-character names.

  • Loading branch information...
commit b2f7dafaac6f5c56d733dded47094a04ddf504d7 1 parent e394a1e
@shadowphoenix shadowphoenix authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  framework/core/OnigRegexp.m
2  framework/core/OnigRegexp.m
@@ -280,7 +280,7 @@ - (NSMutableArray*) captureNameArray {
int co_name_callback(const OnigUChar* name, const OnigUChar* end, int ngroups, int* group_list, OnigRegex re, void* arg) {
OnigResult *result = (OnigResult *)arg;
- [[result captureNameArray] addObject:[NSString stringWithUTF8String:(const char*)name]];
+ [[result captureNameArray] addObject:[NSString stringWithCharacters:(unichar*)name length:((end-name)/CHAR_SIZE)]];
return 0;
Please sign in to comment.
Something went wrong with that request. Please try again.