<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 129: "Array index i is used before limits check" in tinyxml.h</title><link href="https://sourceforge.net/p/tinyxml/bugs/129/" rel="alternate"/><link href="https://sourceforge.net/p/tinyxml/bugs/129/feed.atom" rel="self"/><id>https://sourceforge.net/p/tinyxml/bugs/129/</id><updated>2012-05-21T10:21:27Z</updated><subtitle>Recent changes to 129: "Array index i is used before limits check" in tinyxml.h</subtitle><entry><title>"Array index i is used before limits check" in tinyxml.h</title><link href="https://sourceforge.net/p/tinyxml/bugs/129/" rel="alternate"/><published>2012-05-21T10:21:27Z</published><updated>2012-05-21T10:21:27Z</updated><author><name>serval24</name><uri>https://sourceforge.net/u/serval2412/</uri></author><id>https://sourceforge.net057ace6d1a139ef7e72dfe52cca664331bcde6a7</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Cppcheck reported this :&lt;br /&gt;
[tinyxml.h:353]: (style) Array index i is used before limits check&lt;br /&gt;
Here are the lines :&lt;br /&gt;
353 for( int i=0; p[i] &amp;amp;&amp;amp; i&amp;lt;*length; ++i ) {&lt;br /&gt;
354 _value[i] = p[i];&lt;br /&gt;
355 }&lt;/p&gt;
&lt;p&gt;So I think line 353 should be changed like this :&lt;br /&gt;
for( int i=0; i&amp;lt;*length &amp;amp;&amp;amp; p[i]; ++i ) {&lt;/p&gt;
&lt;p&gt;Julien.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>