Common / Core: Update StringUtil to allow specifying the base, default to 0. Fix ActionReplay code to use this instead of prepending '0x' in front

This commit is contained in:
iwubcode
2020-05-23 18:40:10 -05:00
parent 393ce529af
commit 85e11cd4ab
2 changed files with 5 additions and 5 deletions

View File

@ -236,8 +236,8 @@ std::vector<ARCode> LoadCodes(const IniFile& global_ini, const IniFile& local_in
if (pieces.size() == 2 && pieces[0].size() == 8 && pieces[1].size() == 8)
{
AREntry op;
bool success_addr = TryParse(std::string("0x") + pieces[0], &op.cmd_addr);
bool success_val = TryParse(std::string("0x") + pieces[1], &op.value);
bool success_addr = TryParse(pieces[0], &op.cmd_addr, 16);
bool success_val = TryParse(pieces[1], &op.value, 16);
if (success_addr && success_val)
{