summaryrefslogtreecommitdiff
path: root/macosx/ConfigurationController.m
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/ConfigurationController.m')
-rw-r--r--macosx/ConfigurationController.m5
1 files changed, 3 insertions, 2 deletions
diff --git a/macosx/ConfigurationController.m b/macosx/ConfigurationController.m
index 513a0489..1820b8e9 100644
--- a/macosx/ConfigurationController.m
+++ b/macosx/ConfigurationController.m
@@ -15,10 +15,10 @@ NSString *memChangeNotifier = @"PcsxrMemoryCardDidChangeNotifier";
{
if (theCard == 1) {
[[NSUserDefaults standardUserDefaults] setObject:theFile forKey:@"Mcd1"];
- strcpy(Config.Mcd1, [theFile fileSystemRepresentation] );
+ strlcpy(Config.Mcd1, [theFile fileSystemRepresentation], MAXPATHLEN );
} else {
[[NSUserDefaults standardUserDefaults] setObject:theFile forKey:@"Mcd2"];
- strcpy(Config.Mcd2, [theFile fileSystemRepresentation] );
+ strlcpy(Config.Mcd2, [theFile fileSystemRepresentation], MAXPATHLEN );
}
[[NSNotificationCenter defaultCenter] postNotificationName:memChangeNotifier object:nil];
@@ -222,6 +222,7 @@ NSString *memChangeNotifier = @"PcsxrMemoryCardDidChangeNotifier";
[[NSNotificationCenter defaultCenter] removeObserver:self];
[checkBoxDefaults release];
if (memCardEdit) {
+ [memCardEdit close];
[memCardEdit release];
}
[super dealloc];