From 7e8724f1582bfe8b698d936ecb030a0628acb3df Mon Sep 17 00:00:00 2001 From: Dave Murphy Date: Mon, 15 Dec 2014 02:25:36 +0000 Subject: [PATCH] use limits.h & PATH_MAX --- source/libfat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/libfat.c b/source/libfat.c index aabb3ad..2494759 100644 --- a/source/libfat.c +++ b/source/libfat.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include "common.h" #include "partition.h" @@ -167,7 +167,7 @@ bool fatInit (uint32_t cacheSize, bool setAsDefaultDevice) { } if (setAsDefaultDevice) { - char filePath[MAXPATHLEN * 2]; + char filePath[PATH_MAX]; strcpy (filePath, _FAT_disc_interfaces[defaultDevice].name); strcat (filePath, ":/"); #ifdef ARGV_MAGIC