mirror of
https://github.com/glest/glest-source.git
synced 2025-09-01 12:02:36 +02:00
- working on crc bug
This commit is contained in:
@@ -250,7 +250,7 @@ bool Checksum::addFileToSum(const string &path) {
|
|||||||
|
|
||||||
#if defined(WIN32) && !defined(__MINGW32__)
|
#if defined(WIN32) && !defined(__MINGW32__)
|
||||||
wstring wstr = utf8_decode(path);
|
wstring wstr = utf8_decode(path);
|
||||||
FILE *fp = _wfopen(wstr.c_str(), L"r");
|
FILE *fp = _wfopen(wstr.c_str(), L"rb");
|
||||||
ifstream ifs(fp);
|
ifstream ifs(fp);
|
||||||
#else
|
#else
|
||||||
ifstream ifs(path.c_str());
|
ifstream ifs(path.c_str());
|
||||||
@@ -277,7 +277,7 @@ bool Checksum::addFileToSum(const string &path) {
|
|||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] buf.size() = %d, path [%s], isXMLFile = %d\n",__FILE__,__FUNCTION__,__LINE__,buf.size(), path.c_str(),isXMLFile);
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] buf.size() = %d, path [%s], isXMLFile = %d\n",__FILE__,__FUNCTION__,__LINE__,buf.size(), path.c_str(),isXMLFile);
|
||||||
|
|
||||||
if(isXMLFile == true) {
|
if(isXMLFile == true) {
|
||||||
for(unsigned int i = 0; i < buf.size(); ++i) {
|
for(std::size_t i = 0; i < buf.size(); ++i) {
|
||||||
// Ignore Spaces in XML files as they are
|
// Ignore Spaces in XML files as they are
|
||||||
// ONLY for formatting
|
// ONLY for formatting
|
||||||
//if(isXMLFile == true) {
|
//if(isXMLFile == true) {
|
||||||
@@ -285,9 +285,11 @@ bool Checksum::addFileToSum(const string &path) {
|
|||||||
if(buf[i] == '>' && i >= 3 && buf[i-1] == '-' && buf[i-2] == '-') {
|
if(buf[i] == '>' && i >= 3 && buf[i-1] == '-' && buf[i-2] == '-') {
|
||||||
inCommentTag = false;
|
inCommentTag = false;
|
||||||
//printf("TURNING OFF comment TAG, i = %d [%c]",i,buf[i]);
|
//printf("TURNING OFF comment TAG, i = %d [%c]",i,buf[i]);
|
||||||
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] i = %d\n",__FILE__,__FUNCTION__,__LINE__,i);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
//printf("SKIPPING XML comment character, i = %d [%c]",i,buf[i]);
|
//printf("SKIPPING XML comment character, i = %d [%c]",i,buf[i]);
|
||||||
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] i = %d\n",__FILE__,__FUNCTION__,__LINE__,i);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -295,10 +297,12 @@ bool Checksum::addFileToSum(const string &path) {
|
|||||||
else if(buf[i] == '<' && i+4 < bufSize && buf[i+1] == '!' && buf[i+2] == '-' && buf[i+3] == '-') {
|
else if(buf[i] == '<' && i+4 < bufSize && buf[i+1] == '!' && buf[i+2] == '-' && buf[i+3] == '-') {
|
||||||
inCommentTag = true;
|
inCommentTag = true;
|
||||||
//printf("TURNING ON comment TAG, i = %d [%c]",i,buf[i]);
|
//printf("TURNING ON comment TAG, i = %d [%c]",i,buf[i]);
|
||||||
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] i = %d\n",__FILE__,__FUNCTION__,__LINE__,i);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if(buf[i] == ' ' || buf[i] == '\t' || buf[i] == '\n' || buf[i] == '\r') {
|
else if(buf[i] == ' ' || buf[i] == '\t' || buf[i] == '\n' || buf[i] == '\r') {
|
||||||
//printf("SKIPPING special character, i = %d [%c]",i,buf[i]);
|
//printf("SKIPPING special character, i = %d [%c]",i,buf[i]);
|
||||||
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugSystem).enabled) SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d] i = %d\n",__FILE__,__FUNCTION__,__LINE__,i);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//}
|
//}
|
||||||
|
Reference in New Issue
Block a user