title: Check function Compare Issue
body: <p>Im writing a function that compares a 32bit CRC that is extracted from a Buffer (<code>uint32_t lBuffer[10]</code>) which first ten entries contain randomly generated data, to a calculated CRC which is computed within the <code>CheckCRC</code> function. Can anyone see why it doesn't want to give a true result? Any help would be much appreciated!</p>
  
  <p>Here is the function code:</p>
  
  <pre><code>bool CRC32::CheckCRC(const uint32_t* plData , uint32_t lLength, uint32_t previousCrc32)
  {
      bool FlagPass;
      uint32_t lCalcCRC,lMsgCRC;
  
  
      //Msg CRC needs to be extracted first
      lMsgCRC = plData[lLength-1];
  
      //Newly calculated CRC
      //lCalcCRC = calculate_CRC32(plData,lLength-1,lInitCRC);
  
      lCalcCRC = ~previousCrc32;
      unsigned char* current = (unsigned char*) plData;
  
      while (lLength--)
      {
          lCalcCRC = (lCalcCRC &gt;&gt; 8) ^ crc_table[(lCalcCRC &amp; 0xFF) ^ *current++];
      }
      lCalcCRC = ~lCalcCRC;
  
  
      if (lCalcCRC == lMsgCRC)
      {
        FlagPass = true;
      }
      else
      {
        FlagPass = false;
      }
      return FlagPass;
  }
  </code></pre>