Skip to content

Commit

Permalink
- Fixing tag parse error
Browse files Browse the repository at this point in the history
  • Loading branch information
Donerkebap13 committed Sep 16, 2018
1 parent 5467c98 commit 2441ffc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions DonerComponents/source/common/tags/CTagsManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ namespace DonerComponents
DC_ERROR_MSG(EErrorCode::FileNotFound, "error opening %s", path);
return false;
}

return ParseTagsFromJson((const char*)mdp.GetBaseData());
std::string zeroTerminatedStr((const char*)mdp.GetBaseData(), mdp.GetSize());
return ParseTagsFromJson(zeroTerminatedStr.c_str());
}

bool CTagsManager::ParseTagsFromMemory(const unsigned char* jsonStringBuffer, std::size_t size)
Expand All @@ -103,8 +103,8 @@ namespace DonerComponents
DC_ERROR_MSG(EErrorCode::ReadFromBufferFailed, "Error reading from Buffer");
return false;
}

return ParseTagsFromJson((const char*)mdp.GetBaseData());
std::string zeroTerminatedStr((const char*)mdp.GetBaseData(), mdp.GetSize());
return ParseTagsFromJson(zeroTerminatedStr.c_str());
}

bool CTagsManager::ParseTagsFromJson(const char* const jsonStr)
Expand Down

0 comments on commit 2441ffc

Please # to comment.