summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-09-17 16:54:09 +0200
committerLioncash <mathew1800@gmail.com>2020-09-17 16:54:12 +0200
commit057aa6275d4bfcdf043d0181d5284ca2023faaf2 (patch)
tree916ce4df44cb507e680c9949c125c35c59dddb8c /src/core
parentservice/sm: Eliminate dependency on the global system instance (diff)
downloadyuzu-057aa6275d4bfcdf043d0181d5284ca2023faaf2.tar
yuzu-057aa6275d4bfcdf043d0181d5284ca2023faaf2.tar.gz
yuzu-057aa6275d4bfcdf043d0181d5284ca2023faaf2.tar.bz2
yuzu-057aa6275d4bfcdf043d0181d5284ca2023faaf2.tar.lz
yuzu-057aa6275d4bfcdf043d0181d5284ca2023faaf2.tar.xz
yuzu-057aa6275d4bfcdf043d0181d5284ca2023faaf2.tar.zst
yuzu-057aa6275d4bfcdf043d0181d5284ca2023faaf2.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/sm/sm.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/service/sm/sm.cpp b/src/core/hle/service/sm/sm.cpp
index 2aedc93ea..9c1da361b 100644
--- a/src/core/hle/service/sm/sm.cpp
+++ b/src/core/hle/service/sm/sm.cpp
@@ -27,11 +27,11 @@ void ServiceManager::InvokeControlRequest(Kernel::HLERequestContext& context) {
}
static ResultCode ValidateServiceName(const std::string& name) {
- if (name.size() <= 0 || name.size() > 8) {
+ if (name.empty() || name.size() > 8) {
LOG_ERROR(Service_SM, "Invalid service name! service={}", name);
return ERR_INVALID_NAME;
}
- if (name.find('\0') != std::string::npos) {
+ if (name.rfind('\0') != std::string::npos) {
LOG_ERROR(Service_SM, "A non null terminated service was passed");
return ERR_INVALID_NAME;
}