From 5f6951a6dd725df9dd64dc5aacac2a24f6b5be7a Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Fri, 21 Jun 2013 15:08:36 -0700 Subject: [PATCH] Replace only use of apr_strtok with manual loop. --- ObjectiveC/Library.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ObjectiveC/Library.mm b/ObjectiveC/Library.mm index e430c0c..4215453 100644 --- a/ObjectiveC/Library.mm +++ b/ObjectiveC/Library.mm @@ -519,7 +519,9 @@ struct PropertyAttributes { name = property_getName(property); const char *attributes(property_getAttributes(property)); - for (char *state, *token(apr_strtok(pool_.strdup(attributes), ",", &state)); token != NULL; token = apr_strtok(NULL, ",", &state)) { + for (char *token(pool_.strdup(attributes)), *next; token != NULL; token = next) { + if ((next = strchr(token, ',')) != NULL) + *next++ = '\0'; switch (*token) { case 'R': readonly = true; break; case 'C': copy = true; break; -- 2.45.2