mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-22 19:05:08 -04:00
htc: implement service channel parsing (ReceiveReadyPacket)
This commit is contained in:
parent
4e9bc617bb
commit
6fc24d8883
5 changed files with 322 additions and 0 deletions
|
@ -88,4 +88,17 @@ namespace ams::util {
|
|||
return static_cast<int>(cur - src);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
constexpr int Strnlen(const T *str, int count) {
|
||||
AMS_ASSERT(str != nullptr);
|
||||
AMS_ASSERT(count >= 0);
|
||||
|
||||
int length = 0;
|
||||
while (count-- && *str++) {
|
||||
++length;
|
||||
}
|
||||
|
||||
return length;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue