[DEBUG] MAC BUILD ERROR IN LOG

This commit is contained in:
Edouard DUPIN 2015-06-22 21:38:42 +02:00
parent bae302629e
commit e7599b676c

View File

@ -425,16 +425,16 @@ void etk::log::logChar(int32_t _id, int32_t _level, int32_t _ligne, const char*
if (startPos != nullptr) {
if (stopPos != nullptr) {
if(stopPos < startPos) {
snprintf(tmpPointer, std::min(1024, stopPos-_funcName), "%s", _funcName);
snprintf(tmpPointer, std::min(1024, int32_t(stopPos-_funcName)), "%s", _funcName);
} else {
snprintf(tmpPointer, std::min(1024, stopPos-startPos), "%s", startPos+1);
snprintf(tmpPointer, std::min(1024, int32_t(stopPos-startPos)), "%s", startPos+1);
}
} else {
snprintf(tmpPointer, 1024, "%s", startPos);
}
} else {
if (stopPos != nullptr) {
snprintf(tmpPointer, std::min(1024, stopPos-_funcName), "%s", _funcName);
snprintf(tmpPointer, std::min(1024, int32_t(stopPos-_funcName)), "%s", _funcName);
} else {
snprintf(tmpPointer, 1024, "%s", _funcName);
}