A hack for gcc: mingw 3.3.1 does some weird optimization with -O3 if "str" and "fmt" aren't used like this in mxsscanf. Dunno why.

This commit is contained in:
Moritz Bunkus 2004-12-16 23:23:14 +00:00
parent 05ecf0b346
commit f82eed21f3

View File

@ -1540,6 +1540,7 @@ mxsscanf(const string &str,
string new_fmt;
int result;
mxverb(5, "mxsscanf: str: %s /// fmt: %s\n", str.c_str(), fmt);
fix_format(fmt, new_fmt);
va_start(ap, fmt);
result = vsscanf(str.c_str(), new_fmt.c_str(), ap);