mirror of
https://github.com/glest/glest-source.git
synced 2025-08-17 13:50:43 +02:00
fix for wrong CRCs in Mod menu
This commit is contained in:
@@ -889,7 +889,7 @@ string MenuStateMods::refreshTechModInfo(string techInfo) {
|
|||||||
if(itemPath.empty()==false){
|
if(itemPath.empty()==false){
|
||||||
bool forceRefresh = (mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
bool forceRefresh = (mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
||||||
int crc=getFolderTreeContentsCheckSumRecursively(itemPath, ".xml", NULL,forceRefresh);
|
int crc=getFolderTreeContentsCheckSumRecursively(itemPath, ".xml", NULL,forceRefresh);
|
||||||
modinfo.localCRC=intToStr(crc);
|
modinfo.localCRC=uIntToStr(crc);
|
||||||
//printf("itemPath='%s' remote crc:'%s' local crc:'%s' crc='%d' \n",itemPath.c_str(),modinfo.crc.c_str(),modinfo.localCRC.c_str(),crc);
|
//printf("itemPath='%s' remote crc:'%s' local crc:'%s' crc='%d' \n",itemPath.c_str(),modinfo.crc.c_str(),modinfo.localCRC.c_str(),crc);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -939,7 +939,7 @@ string MenuStateMods::refreshTilesetModInfo(string tilesetInfo) {
|
|||||||
if(itemPath.empty()==false){
|
if(itemPath.empty()==false){
|
||||||
bool forceRefresh = (mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
bool forceRefresh = (mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
||||||
int crc=getFolderTreeContentsCheckSumRecursively(itemPath, ".xml", NULL,forceRefresh);
|
int crc=getFolderTreeContentsCheckSumRecursively(itemPath, ".xml", NULL,forceRefresh);
|
||||||
modinfo.localCRC=intToStr(crc);
|
modinfo.localCRC=uIntToStr(crc);
|
||||||
//printf("itemPath='%s' remote crc:'%s' local crc:'%s' crc='%d' \n",itemPath.c_str(),modinfo.crc.c_str(),modinfo.localCRC.c_str(),crc);
|
//printf("itemPath='%s' remote crc:'%s' local crc:'%s' crc='%d' \n",itemPath.c_str(),modinfo.crc.c_str(),modinfo.localCRC.c_str(),crc);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@@ -1041,7 +1041,7 @@ string MenuStateMods::getMapCRC(string mapName) {
|
|||||||
if (fileExists(itemPath)){
|
if (fileExists(itemPath)){
|
||||||
checksum.addFile(itemPath);
|
checksum.addFile(itemPath);
|
||||||
int crc=checksum.getSum();
|
int crc=checksum.getSum();
|
||||||
result=intToStr(crc);
|
result=uIntToStr(crc);
|
||||||
//printf("itemPath='%s' modinfo.name='%s' remote crc:'%s' local crc:'%s' crc='%d' \n",itemPath.c_str(),modinfo.name.c_str(),modinfo.crc.c_str(),modinfo.localCRC.c_str(),crc);
|
//printf("itemPath='%s' modinfo.name='%s' remote crc:'%s' local crc:'%s' crc='%d' \n",itemPath.c_str(),modinfo.name.c_str(),modinfo.crc.c_str(),modinfo.localCRC.c_str(),crc);
|
||||||
}
|
}
|
||||||
else result="";
|
else result="";
|
||||||
@@ -1090,7 +1090,7 @@ string MenuStateMods::refreshScenarioModInfo(string scenarioInfo) {
|
|||||||
if(itemPath.empty()==false){
|
if(itemPath.empty()==false){
|
||||||
bool forceRefresh = (mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
bool forceRefresh = (mapCRCUpdateList.find(itemPath) == mapCRCUpdateList.end());
|
||||||
int crc=getFolderTreeContentsCheckSumRecursively(itemPath, ".xml", NULL,forceRefresh);
|
int crc=getFolderTreeContentsCheckSumRecursively(itemPath, ".xml", NULL,forceRefresh);
|
||||||
modinfo.localCRC=intToStr(crc);
|
modinfo.localCRC=uIntToStr(crc);
|
||||||
//printf(" itemPath='%s' remote crc:'%s' local crc:'%s' crc='%d' \n",itemPath.c_str(),modinfo.crc.c_str(),modinfo.localCRC.c_str(),crc);
|
//printf(" itemPath='%s' remote crc:'%s' local crc:'%s' crc='%d' \n",itemPath.c_str(),modinfo.crc.c_str(),modinfo.localCRC.c_str(),crc);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Reference in New Issue
Block a user