New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed: NULL remoteHost in IOCTL_SO_INETATON #2503
Conversation
Not pretty, but that's not your fault... lgtm |
{ | ||
Memory::Write_U32(Common::swap32(*(u32*)remoteHost->h_addr_list[0]), BufferOut); | ||
INFO_LOG(WII_IPC_NET, "IOCTL_SO_INETATON = %d " | ||
"%s, BufferIn: (%08x, %i), BufferOut: (%08x, %i), IP Found: %08X", remoteHost->h_addr_list[0] == nullptr ? -1 : 0, |
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
The last value can be set to INADDR_NONE (i.e. -1) when remoteHost is NULL. I'm not a huge fan of it because it's a valid broadcast address, but it's only for INFO_LOG so it should be fine. |
Oh, and both the old and the current code dereference |
If you're doing a cleanup anyways, why not make it an |
There is no normal way for Otherwise, making two distinct logs can be a good idea and it would be slightly faster than those ternaries I guess. What would you advise me to do? |
Its unlikely to be noticably any faster or slower; my argument is for readibilty. |
FifoCI detected that this change impacts graphical rendering. Here are the behavior differences detected by the system:
automated-fifoci-reporter |
Fine. Looks like my first commit but with more checks which allowed to get rid of those ternaries and unnecessary string formats by the same way. However I don't know how this kind of changes can impact graphical rendering... |
Ignore dx-win-nv, it's currently broken. |
Fixed: NULL remoteHost in IOCTL_SO_INETATON
Fix a crash when a domain name doesn't exist. (Ex: Monster Hunter Tri)