mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fixed inconsistency in integer sizes that caused segmentation fault while hashing files also broken message on the GUI
This commit is contained in:
parent
70c8e14d16
commit
8500b5e9f5
@ -146,7 +146,7 @@ void HashStorage::data_tick()
|
||||
std::cerr << "Hashing file " << job.full_path << "..." ; std::cerr.flush();
|
||||
|
||||
std::string tmpout;
|
||||
rs_sprintf(tmpout, "%lu/%lu (%s - %d%%) : %s", mHashCounter+1, mTotalFilesToHash, friendlyUnit(mTotalHashedSize).c_str(), int(mTotalHashedSize/double(mTotalSizeToHash)*100.0), job.full_path.c_str()) ;
|
||||
rs_sprintf(tmpout, "%lu/%lu (%s - %d%%) : %s", (unsigned long int)mHashCounter+1, (unsigned long int)mTotalFilesToHash, friendlyUnit(mTotalHashedSize).c_str(), int(mTotalHashedSize/double(mTotalSizeToHash)*100.0), job.full_path.c_str()) ;
|
||||
|
||||
RsServer::notify()->notifyHashingInfo(NOTIFY_HASHTYPE_HASH_FILE, tmpout) ;
|
||||
|
||||
|
@ -129,7 +129,7 @@ private:
|
||||
|
||||
RsMutex mHashMtx ;
|
||||
bool mRunning;
|
||||
uint32_t mHashCounter;
|
||||
uint64_t mHashCounter;
|
||||
uint32_t mInactivitySleepTime ;
|
||||
uint64_t mTotalSizeToHash ;
|
||||
uint64_t mTotalHashedSize ;
|
||||
|
Loading…
Reference in New Issue
Block a user