소스 검색

nifm: correct assert in CreateTemporaryNetworkProfile

This has been wrong since https://github.com/yuzu-emu/yuzu/commit/0432af5ad1ec34f02071f6fdc5fc78149b059f18
I haven't found a game that called this function (and I haven't tried this on a real Switch), and because of this I haven't been able to check if the number in assert OR the string in the assert is wrong, but one of the two is wrong:
NetworkProfileData is 0x18E, while SfNetworkProfileData is 0x17C, according to Switchbrew
Switchbrew doesn't officially say that NetworkProfileData's size is 0x18E but it's possible to calculate its size since Switchbrew provides the size and the offset of all the components of NetworkProfileData (which isn't currently implemented in yuzu, alongside SfNetworkProfileData)
NetworkProfileData documentation: https://switchbrew.org/wiki/Network_Interface_services#NetworkProfileData
SfNetworkProfileData documentation: https://switchbrew.org/wiki/Network_Interface_services#SfNetworkProfileData
Since I trust ogniK's work on reversing NIFM, I'd assume this was just a typo in the string
VolcaEM 6 년 전
부모
커밋
235805edf3
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/core/hle/service/nifm/nifm.cpp

+ 1 - 1
src/core/hle/service/nifm/nifm.cpp

@@ -177,7 +177,7 @@ private:
     void CreateTemporaryNetworkProfile(Kernel::HLERequestContext& ctx) {
     void CreateTemporaryNetworkProfile(Kernel::HLERequestContext& ctx) {
         LOG_DEBUG(Service_NIFM, "called");
         LOG_DEBUG(Service_NIFM, "called");
 
 
-        ASSERT_MSG(ctx.GetReadBufferSize() == 0x17c, "NetworkProfileData is not the correct size");
+        ASSERT_MSG(ctx.GetReadBufferSize() == 0x17c, "SfNetworkProfileData is not the correct size");
         u128 uuid{};
         u128 uuid{};
         auto buffer = ctx.ReadBuffer();
         auto buffer = ctx.ReadBuffer();
         std::memcpy(&uuid, buffer.data() + 8, sizeof(u128));
         std::memcpy(&uuid, buffer.data() + 8, sizeof(u128));