diff options
author | Chris Robinson <[email protected]> | 2012-09-12 03:45:26 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-09-12 03:45:26 -0700 |
commit | ce8a0a9fd5bfcbe3c34d2967e2e1c3500766e3f1 (patch) | |
tree | 018c3190aa931f555b11368d0e7c5d0971c44523 | |
parent | f59e4ba7c26c9e5cacc69983b293c47e4d4a43fd (diff) |
Use PATH_MAX for the fname length
-rw-r--r-- | Alc/hrtf.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -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; |