Browse Source

bugfix: unresolved host should return -1 instead of 0

ncannasse 6 năm trước cách đây
mục cha
commit
1d7469257d
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/std/socket.c

+ 1 - 1
src/std/socket.c

@@ -202,7 +202,7 @@ HL_PRIM int hl_host_resolve( vbyte *host ) {
 #	endif
 		if( h == NULL ) {
 			hl_blocking(false);
-			return 0;
+			return -1;
 		}
 		ip = *((unsigned int*)h->h_addr_list[0]);
 	}