summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-11-17 20:41:27 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-11-17 20:41:27 +0000
commit78a2df52ff3f2c081b1382bcb667c69df43976a9 (patch)
treed50483f3b4e29ee80c65dd56e393bffc93d98357
parent61fe406a8b2dcbdb80225001163379b720fd1a2e (diff)
downloadpcsxr-78a2df52ff3f2c081b1382bcb667c69df43976a9.tar.gz
use MAXPATHLEN when copying over file names
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@72385 e17a0e51-4ae3-4d35-97c3-1a29b211df97
-rw-r--r--macosx/PcsxrController.m10
1 files changed, 5 insertions, 5 deletions
diff --git a/macosx/PcsxrController.m b/macosx/PcsxrController.m
index 1726d753..bfa9b0be 100644
--- a/macosx/PcsxrController.m
+++ b/macosx/PcsxrController.m
@@ -368,19 +368,19 @@ NSString *saveStatePath;
url = [supportURL URLByAppendingPathComponent:@"Pcsxr/Memory Cards/Mcd001.mcr"];
str = [[url path] fileSystemRepresentation];
- if (str != nil) strncpy(Config.Mcd1, str, 255);
+ if (str != nil) strncpy(Config.Mcd1, str, MAXPATHLEN);
url = [supportURL URLByAppendingPathComponent:@"Pcsxr/Memory Cards/Mcd002.mcr"];
str = [[url path] fileSystemRepresentation];
- if (str != nil) strncpy(Config.Mcd2, str, 255);
+ if (str != nil) strncpy(Config.Mcd2, str, MAXPATHLEN);
url = [supportURL URLByAppendingPathComponent:@"Pcsxr/Bios"];
str = [[url path] fileSystemRepresentation];
- if (str != nil) strncpy(Config.BiosDir, str, 255);
+ if (str != nil) strncpy(Config.BiosDir, str, MAXPATHLEN);
url = [supportURL URLByAppendingPathComponent:@"Pcsxr/Patches"];
str = [[url path] fileSystemRepresentation];
- if (str != nil) strncpy(Config.PatchesDir, str, 255);
+ if (str != nil) strncpy(Config.PatchesDir, str, MAXPATHLEN);
} else {
strcpy(Config.BiosDir, "Bios/");
strcpy(Config.PatchesDir, "Patches/");
@@ -392,7 +392,7 @@ NSString *saveStatePath;
// set plugin path
path = [[NSBundle mainBundle] builtInPlugInsPath];
str = [path fileSystemRepresentation];
- if (str != nil) strncpy(Config.PluginsDir, str, 255);
+ if (str != nil) strncpy(Config.PluginsDir, str, MAXPATHLEN);
// locate a bios
biosList = [[NSMutableArray alloc] init];