Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Albert hung garmin format error #976

Merged
merged 2 commits into from
Apr 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tinyxml2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2509,7 +2509,7 @@ void XMLDocument::ClearError() {

void XMLDocument::SetError( XMLError error, int lineNum, const char* format, ... )
{
TIXMLASSERT( error >= 0 && error < XML_ERROR_COUNT );
TIXMLASSERT(error >= 0 && error < XML_ERROR_COUNT);
_errorID = error;
_errorLineNum = lineNum;
_errorStr.Reset();
Expand All @@ -2518,7 +2518,8 @@ void XMLDocument::SetError( XMLError error, int lineNum, const char* format, ...
char* buffer = new char[BUFFER_SIZE];

TIXMLASSERT(sizeof(error) <= sizeof(int));
TIXML_SNPRINTF(buffer, BUFFER_SIZE, "Error=%s ErrorID=%d (0x%x) Line number=%d", ErrorIDToName(error), int(error), int(error), lineNum);
TIXML_SNPRINTF(buffer, BUFFER_SIZE, "Error=%s ErrorID=%d (0x%x) Line number=%d",
ErrorIDToName(error), static_cast<int>(error), static_cast<unsigned int>(error), lineNum);

if (format) {
size_t len = strlen(buffer);
Expand Down
Loading