about summary refs log tree commit diff stats
path: root/src/libtools
diff options
context:
space:
mode:
Diffstat (limited to 'src/libtools')
-rw-r--r--src/libtools/libc_net32.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/libtools/libc_net32.c b/src/libtools/libc_net32.c
index bfcc606b..14101aea 100644
--- a/src/libtools/libc_net32.c
+++ b/src/libtools/libc_net32.c
@@ -114,17 +114,20 @@ EXPORT void* my32_gethostbyname(x64emu_t* emu, const char* a)
     int idx = 0;
     ret.h_aliases = h->h_aliases?s:0;
     if(h->h_aliases) {
-        char* p = *h->h_aliases;
-        while(p) {
-            strings[idx++] = to_cstring(p++);
+        char** p = h->h_aliases;
+        while(*p) {
+            strings[idx++] = to_cstring(*p);
+            ++p;
         }
         strings[idx++] = 0;
     }
     ret.h_addr_list = h->h_addr_list?to_ptrv(&strings[idx]):0;
     if(h->h_addr_list) {
-        void* p = *h->h_addr_list;
-        while(p)
-            strings[idx++] = to_ptrv(p++);
+        char** p = h->h_addr_list;
+        while(*p) {
+            strings[idx++] = to_ptrv(*p);
+            ++p;
+        }   
         strings[idx++] = 0;
     }
     // done