Ooops - I missed out the max_size sanity check.
I'm obviously too used to Delphi silently preventing buffer overflows in the string types.
*mutters* char is not string, char is not string...
@Goober:
Could be. I trimmed it in Release builds as the list is often long.
@ Zacam, The_E:
I specifically avoided opening mod.ini because FS2Open actually never touches it - it's only used by the Launcher to build the command line.
I suppose that takes us back to the stuff raised by Portej.
As a start to that, would it make sense for FS2Open to handle the Mod.Ini stuff itself, with the Launcher merely pointing FS2 at it?
For backwards compatibility:
FS2 counts -mod command line terms.
- If there is only one Mod term, process Mod.Ini to find the rest.
- Otherwise, process the additional terms.
Patch attached that corrects the issue.
This is also built against 5620, so revert to SVN before applying.
[attachment deleted by admin]