Work around broken scanf() implementations.

This commit is contained in:
Markus F.X.J. Oberhumer
2007-03-22 07:30:16 +01:00
parent 0e2fa6eb9d
commit 0fcaa3a2f5
+5
View File
@@ -235,7 +235,12 @@ void ElfLinker::preprocessSymbols(char *start, char *end)
addSymbol(s, "*ABS*", value); addSymbol(s, "*ABS*", value);
assert(offset == 0); assert(offset == 0);
} }
#if 0
else if (sscanf(start, "%x%*8c %1023s %*x %1023s", else if (sscanf(start, "%x%*8c %1023s %*x %1023s",
#else
// work around broken scanf implementations
else if (sscanf(start, "%x%*c%*c%*c%*c%*c%*c%*c%*c %1023s %*x %1023s",
#endif
&offset, section, symbol) == 3) &offset, section, symbol) == 3)
{ {
char *s = strstr(start, symbol); char *s = strstr(start, symbol);