Skip to content

Commit

Permalink
Fixes proposed by Frederick Seiffert
Browse files Browse the repository at this point in the history
  • Loading branch information
rfm committed Dec 7, 2024
1 parent 7c038ff commit 30d66f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/NSBundle.m
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ + (NSString**) frameworkClasses;
#endif

/* Strip off the name of the executable */
path = [toolName stringByDeletingLastPathComponent];
path = [GSPrivateExecutablePath() stringByDeletingLastPathComponent];

/* We now need to chop off the extra subdirectories, the library
combo and the target directory if they exist. The executable
Expand Down Expand Up @@ -3453,7 +3453,7 @@ + (AAsset *) assetForPath: (NSString *)path withMode: (int)mode
{
NSString *resourcePath = [_mainBundle resourcePath];

if ([path hasPrefix: resourcePath]
if (resourcePath && [path hasPrefix: resourcePath]
&& [path length] > [resourcePath length])
{
NSString *assetPath;
Expand Down

0 comments on commit 30d66f5

Please sign in to comment.