It&#x27;s just one line. Put this before the loop if the code logically shouldn&#x27;t trigger this.<p><pre><code>  assert( B &lt; B_TYPE_MAX - 4 );
</code></pre>
Or use an if statement if it could trigger at runtime.<p>Also the code is clearer on intent.