]> git.sesse.net Git - stockfish/blobdiff - src/ucioption.cpp
Fix a subtle bug in UCI options printing
[stockfish] / src / ucioption.cpp
index eefacb22bc447293ae168923461614c16a68b7aa..062b26d70649a9528645de856ba35452e3c30c5f 100644 (file)
@@ -92,7 +92,7 @@ void init(OptionsMap& o) {
 
 std::ostream& operator<<(std::ostream& os, const OptionsMap& om) {
 
-  for (size_t idx = 0; idx < om.size(); ++idx)
+  for (size_t idx = 0; idx < om.size() + 1; ++idx) // idx could start from 1
       for (OptionsMap::const_iterator it = om.begin(); it != om.end(); ++it)
           if (it->second.idx == idx)
           {