summaryrefslogtreecommitdiffstats
path: root/Mac/Compat/chdir.c
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1995-01-18 13:55:41 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1995-01-18 13:55:41 (GMT)
commit67132b3de71751d90cfe69a235d47b6ceb327082 (patch)
tree86999b4d590e27717460ee5ad676ec5e2121c939 /Mac/Compat/chdir.c
parent5f653091d1c5a453b8a0c71b304c600c0f3f52b0 (diff)
downloadcpython-67132b3de71751d90cfe69a235d47b6ceb327082.zip
cpython-67132b3de71751d90cfe69a235d47b6ceb327082.tar.gz
cpython-67132b3de71751d90cfe69a235d47b6ceb327082.tar.bz2
Some of these were overwriting their argument with a pascal
string. Use own Pstring() routine (which uses a static buffer) everywhere.
Diffstat (limited to 'Mac/Compat/chdir.c')
-rw-r--r--Mac/Compat/chdir.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/Mac/Compat/chdir.c b/Mac/Compat/chdir.c
index b8ec6d7..3f89b52 100644
--- a/Mac/Compat/chdir.c
+++ b/Mac/Compat/chdir.c
@@ -11,11 +11,8 @@ chdir(path)
char *path;
{
WDPBRec pb;
- char name[MAXPATH];
- strncpy(name, path, sizeof name);
- name[MAXPATH-1]= EOS;
- pb.ioNamePtr= (StringPtr) c2pstr(name);
+ pb.ioNamePtr= (StringPtr) Pstring(path);
pb.ioVRefNum= 0;
pb.ioWDDirID= 0;
if (PBHSetVol(&pb, FALSE) != noErr) {