mirror of
				https://github.com/janet-lang/janet
				synced 2025-10-31 07:33:01 +00:00 
			
		
		
		
	More off by one error fixes
This commit is contained in:
		| @@ -303,9 +303,9 @@ static struct addrinfo *janet_get_addrinfo(Janet *argv, int32_t offset, int sock | |||||||
|         /* when is_bind is set, we're performing a connect, but wanting to |         /* when is_bind is set, we're performing a connect, but wanting to | ||||||
|          * specify from where we connect, and in general don't care about a |          * specify from where we connect, and in general don't care about a | ||||||
|          * port */ |          * port */ | ||||||
|         int32_t current_offset = 3; |         int32_t current_offset = 2; | ||||||
|         if (janet_checktype(argv[2], JANET_KEYWORD)) { |         if (janet_checktype(argv[current_offset], JANET_KEYWORD)) { | ||||||
|            current_offset = 4; |            current_offset++; | ||||||
|         } |         } | ||||||
|         host = (char *)janet_getcstring(argv, current_offset); |         host = (char *)janet_getcstring(argv, current_offset); | ||||||
|         port = NULL; |         port = NULL; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 llmII
					llmII