Fix for mingw32 segfault

This commit is contained in:
Kelly Wilson
2009-05-23 14:59:04 -06:00
parent 1791d7b8b4
commit a178d9563d
4 changed files with 7 additions and 3 deletions

View File

@@ -1739,7 +1739,11 @@ Statement *ForeachStatement::semantic(Scope *sc)
default: assert(0);
}
const char *r = (op == TOKforeach_reverse) ? "R" : "";
#ifdef __MINGW32__
int j = sprintf(fdname, "_aApply%s%.*s%lu", r, 2, fntab[flag], dim);
#else
int j = sprintf(fdname, "_aApply%s%.*s%zu", r, 2, fntab[flag], dim);
#endif
assert(j < sizeof(fdname));
//LDC: Build arguments.
Arguments* args = new Arguments;