Fix warnings in raylib for MSVC (#3004)

This commit is contained in:
Jeffery Myers 2023-04-09 13:42:15 -07:00 committed by GitHub
parent 06c17ab7f1
commit e57ee9c0e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -145,7 +145,7 @@ void TraceLog(int logType, const char *text, ...)
default: break;
}
unsigned int textSize = strlen(text);
unsigned int textSize = (unsigned int)strlen(text);
memcpy(buffer + strlen(buffer), text, (textSize < (MAX_TRACELOG_MSG_LENGTH - 12))? textSize : (MAX_TRACELOG_MSG_LENGTH - 12));
strcat(buffer, "\n");
vprintf(buffer, args);