diff --git a/sourcepawn/compiler/sc1.c b/sourcepawn/compiler/sc1.c index 9c8f5c13..8e0a6385 100644 --- a/sourcepawn/compiler/sc1.c +++ b/sourcepawn/compiler/sc1.c @@ -267,7 +267,7 @@ int pc_compile(int argc, char *argv[]) tname=NULL; sname=NULL; #else - char buffer[] = P_tmpdir "/pawn.XXXXXX"; + char *buffer = strdup(P_tmpdir "/pawn.XXXXXX"); close(mkstemp(buffer)); tname=buffer; #endif