title: How is this for loop terminated?
body: <p>Found as a user submission on leetcode for the problem <code>Plus One</code>.</p>
  
  <pre><code>vector&lt;int&gt; plusOne(vector&lt;int&gt;&amp; digits) {
    for (int i=digits.size(); i--; digits[i] = 0)
        if (digits[i]++ &lt; 9)
            return digits;
    digits[0]++;
    digits.push_back(0);
    return digits;
  }
  </code></pre>
  
  <p>Normally there's something in the conditional like <code>i &gt;= 0;</code> How is this for loop terminating and not accesing some -i element? </p>