libeplayer3/input: no need for alloca()

This commit is contained in:
martii
2014-05-03 14:29:26 +02:00
parent f93d4cc794
commit 5450625bc4

View File

@@ -273,7 +273,7 @@ bool Input::ReadSubtitle(const char *filename, const char *format, int pid)
const char *lastDot = strrchr(filename, '.');
if (!lastDot)
return false;
char *subfile = (char *) alloca(strlen(filename) + strlen(format));
char subfile[strlen(filename) + strlen(format)];
strcpy(subfile, filename);
strcpy(subfile + (lastDot + 1 - filename), format);