From: mtheall Date: Wed, 20 Aug 2014 20:01:56 +0000 (-0500) Subject: Reset SOC_hostent_alias to NULL in case the user trashed it. X-Git-Tag: v0.2.0~133^2 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=f58601037ccf96939b911aef330db1eed5da6f03;p=corbenik%2Fctrulib.git Reset SOC_hostent_alias to NULL in case the user trashed it. --- diff --git a/libctru/source/services/soc.c b/libctru/source/services/soc.c index 09308d7..3e488c6 100644 --- a/libctru/source/services/soc.c +++ b/libctru/source/services/soc.c @@ -847,6 +847,8 @@ struct hostent * gethostbyname(const char * name) SOC_hostent.h_length = 4; SOC_hostent.h_addr_list = SOC_hostent_results; + SOC_hostent_alias = NULL; + for(i = 0; i < num_results; ++i) SOC_hostent_results[i] = (char*)outbuf + 0x1908 + i*0x10; SOC_hostent_results[num_results] = NULL;