Skip to content

Instantly share code, notes, and snippets.

@archshift
Created November 23, 2014 20:36
Show Gist options
  • Save archshift/a9a98509df0f8a675529 to your computer and use it in GitHub Desktop.
Save archshift/a9a98509df0f8a675529 to your computer and use it in GitHub Desktop.
if (itr == m_functions.end() || itr->second.func == nullptr) {
std::string error = "unknown/unimplemented function '%s': port=%s";
for (int i = 1; i <= num_params; ++i) {
error += Common::StringFromFormat(", cmd_buff[%i]=%u", i, cmd_buff[i]);
}
std::string name;
if (itr == m_functions.end())
name = Common::StringFromFormat("0x%08X", cmd_buff[0]);
else
name = itr->second.name;
ERROR_LOG(OSHLE, error.c_str(), name.c_str(), GetPortName().c_str());
// TODO(bunnei): Hack - ignore error
cmd_buff[1] = 0;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment