aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-09-12 03:45:26 -0700
committerChris Robinson <[email protected]>2012-09-12 03:45:26 -0700
commitce8a0a9fd5bfcbe3c34d2967e2e1c3500766e3f1 (patch)
tree018c3190aa931f555b11368d0e7c5d0971c44523
parentf59e4ba7c26c9e5cacc69983b293c47e4d4a43fd (diff)
Use PATH_MAX for the fname length
-rw-r--r--Alc/hrtf.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Alc/hrtf.c b/Alc/hrtf.c
index ec9bf707..f743156c 100644
--- a/Alc/hrtf.c
+++ b/Alc/hrtf.c
@@ -29,6 +29,12 @@
#include "alSource.h"
#include "alu.h"
+
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
+
/* Current data set limits defined by the makehrtf utility. */
#define MIN_IR_SIZE (8)
#define MAX_IR_SIZE (128)
@@ -359,7 +365,7 @@ static struct Hrtf *LoadHrtf(ALuint deviceRate)
ALushort *evOffset = NULL;
ALshort *coeffs = NULL;
ALubyte *delays = NULL;
- char fname[256 + 1];
+ char fname[PATH_MAX];
ALchar magic[9];
ALuint i, j;
FILE *f;