title: Dr Memory Unitialized Read Error Disagrees With Dissasembly
body: <p>I have a simple loop whose purpose is to split a line of a (very simple) csv into columns. The relevant section of the foor loop is as follows:</p>
  
  <pre><code>for (size_t i = 0; i&lt; csvRowReader-&gt;_currentRowTextLength; i++)
  {
      char character = csvRowReader-&gt;_currentRowText[i];
  
      if (character == ',') { ... }
      ...
  }
  </code></pre>
  
  <p>Dr Memory reports the following uninitialized read:</p>
  
  <pre><code>Error #1: UNINITIALIZED READ: reading register eax
           CsvRowReader_MoveNext
               c:\users\holli\projects\transporter\source\csv\csvrowreader.c(116):
           ...
  </code></pre>
  
  <p>Now in an attempt to diagnose what was going on viewed the disassembly for that line of code:</p>
  
  <pre><code>   116:         if (character == ',')
  00D4A40F  movsx       eax,byte ptr [ebp-35h]  
  00D4A413  cmp         eax,2Ch  
  00D4A416  jne         CsvRowReader_MoveNext+1F5h (0D4A545h) 
  </code></pre>
  
  <p>At <code>00D4A413</code> the register <code>EAX</code> has a value of <code>EAX = 0000006E</code>. Which is <code>'n'</code>: </p>
  
  <pre><code>(char)(0x0000006E)
  110 'n'
  </code></pre>
  
  <p>So as far as I can tell <code>eax</code> is initialized with a value in this case <code>'n'</code>. I am at my wits end trying to figure out what is causing this error, any any help be greatly appreciated!</p>