From: Martin Westergaard Date: Sun, 31 Oct 2010 13:23:26 +0000 (+0100) Subject: various converti2 fixes X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;ds=sidebyside;h=26b544e35351c8b5038ae4ba89f9fc04c4863ffe;p=freerainbowtables various converti2 fixes --- diff --git a/Client Applications/converti2/converti2.cpp b/Client Applications/converti2/converti2.cpp index d534d81..1d8d5e7 100644 --- a/Client Applications/converti2/converti2.cpp +++ b/Client Applications/converti2/converti2.cpp @@ -447,7 +447,7 @@ void ConvertRainbowTable(string sPathName, string sResultFileName, unsigned int // then write the distance amount of 00's if(diffSize > 1000) { - printf("WARNING! The distance to the next prefix is %i. Do you want to continue writing %i bytes of 0x00? Press y to continue", diffSize, diffSize); + printf("WARNING! The distance to the next prefix is %i. Do you want to continue writing %i bytes of 0x00? Press y to continue", diffSize, (diffSize*m_indexrowsizebytes)); #ifdef _WIN32 if ( _getch() != 'y' ) { #else diff --git a/Client Applications/converti2/converti2.vcxproj b/Client Applications/converti2/converti2.vcxproj index 97d3dad..90f75b9 100644 --- a/Client Applications/converti2/converti2.vcxproj +++ b/Client Applications/converti2/converti2.vcxproj @@ -69,7 +69,7 @@ true ../../Common/rt api;%(AdditionalIncludeDirectories) WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreaded + MultiThreadedDLL true diff --git a/Client Applications/win_build/clientapps.suo b/Client Applications/win_build/clientapps.suo index 0fb8f66..6791d07 100644 Binary files a/Client Applications/win_build/clientapps.suo and b/Client Applications/win_build/clientapps.suo differ diff --git a/Common/rt api/RTReader.cpp b/Common/rt api/RTReader.cpp index f64d603..7fec667 100644 --- a/Common/rt api/RTReader.cpp +++ b/Common/rt api/RTReader.cpp @@ -13,10 +13,10 @@ int RTReader::ReadChains(unsigned int &numChains, RainbowChain *pData) { unsigned int numRead = fread(pData, 1, 16 * numChains, m_pFile); numChains = numRead / 16; + m_chainPosition += numChains; return 0; } -unsigned int RTReader::GetChainsLeft() +UINT4 RTReader::GetChainsLeft() { - unsigned int len = GetFileLen(m_pFile); - return len / 16 - m_chainPosition; + return (GetFileLen(m_pFile) / 16) - m_chainPosition; }