Skip to content

Commit

Permalink
Fixes change to ENABLE_DEBUG_DYLIB default
Browse files Browse the repository at this point in the history
  • Loading branch information
mapierce committed Sep 17, 2024
1 parent 6c88beb commit d2b9580
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,14 @@ - (void)_registerSubclassesInBundle:(NSBundle *)bundle {
unsigned bundleClassCount = 0;

for (int i = 0; i < sizeof(potentialPaths) / sizeof(*potentialPaths); i++) {
#ifdef DEBUG
const char *debugSuffix = ".debug.dylib";
if (strlen(potentialPaths[i]) + strlen(debugSuffix) < sizeof(potentialPaths[i])) {
strcat(potentialPaths[i], debugSuffix);
} else {
printf("Error: Not enough space to append the suffix.\n");
}
#endif
classNames = objc_copyClassNamesForImage(potentialPaths[i], &bundleClassCount);
if (bundleClassCount) {
break;
Expand Down

0 comments on commit d2b9580

Please sign in to comment.