diff options
author | Nico Weber <nicolasweber@gmx.de> | 2013-05-24 01:25:09 (GMT) |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2013-05-24 01:25:09 (GMT) |
commit | 7b59fde1feb193d63df8b6b31ea6894635f18906 (patch) | |
tree | 6ecfac48c6b615cda23dc7fc91e08b9f5fdd3005 /src/ninja.cc | |
parent | 145d4f2f2cf54771f663caa99d9da690eee6438e (diff) | |
parent | 3c8b7515f41f5b636a437a808a77fcad959b6831 (diff) | |
download | Ninja-7b59fde1feb193d63df8b6b31ea6894635f18906.zip Ninja-7b59fde1feb193d63df8b6b31ea6894635f18906.tar.gz Ninja-7b59fde1feb193d63df8b6b31ea6894635f18906.tar.bz2 |
Merge pull request #585 from nico/fixcrash
Don't use va_start() with reference parameters, it's undefined behavior.
Diffstat (limited to 'src/ninja.cc')
-rw-r--r-- | src/ninja.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ninja.cc b/src/ninja.cc index 7ee40df..58c1c80 100644 --- a/src/ninja.cc +++ b/src/ninja.cc @@ -385,7 +385,7 @@ int ToolTargets(Globals* globals, int argc, char* argv[]) { return ToolTargetsList(globals->state); } else { const char* suggestion = - SpellcheckString(mode, "rule", "depth", "all", NULL); + SpellcheckString(mode.c_str(), "rule", "depth", "all", NULL); if (suggestion) { Error("unknown target tool mode '%s', did you mean '%s'?", mode.c_str(), suggestion); @@ -632,7 +632,7 @@ bool DebugEnable(const string& name, Globals* globals) { return true; } else { const char* suggestion = - SpellcheckString(name, "stats", "explain", NULL); + SpellcheckString(name.c_str(), "stats", "explain", NULL); if (suggestion) { Error("unknown debug setting '%s', did you mean '%s'?", name.c_str(), suggestion); |