Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use -[NSString length] instead of strlen() on C string

  • Loading branch information...
commit 47e4c4f889edb029abac2488f192c7fa7402a3df 1 parent 242da25
@sebnow sebnow authored Patrick Thomson committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/YKEmitter.m
View
2  src/YKEmitter.m
@@ -71,7 +71,7 @@ - (int)_writeItem:(id)item toDocument:(yaml_document_t *)doc
} else {
// TODO: Add optional support for tagging emitted items.
// TODO: Wrap long lines.
- nodeID = yaml_document_add_scalar(doc, (yaml_char_t *)YAML_DEFAULT_SCALAR_TAG, (yaml_char_t*)[[item description] UTF8String], strlen([[item description] UTF8String]), YAML_ANY_SCALAR_STYLE);
+ nodeID = yaml_document_add_scalar(doc, (yaml_char_t *)YAML_DEFAULT_SCALAR_TAG, (yaml_char_t*)[[item description] UTF8String], [[item description] length], YAML_ANY_SCALAR_STYLE);
}
return nodeID;
}
Please sign in to comment.
Something went wrong with that request. Please try again.