From f86fe73d59e3774ee1f1ee80d5ca2b41edde60df Mon Sep 17 00:00:00 2001 From: Przemek Stekiel Date: Tue, 14 Mar 2023 09:55:29 +0100 Subject: [PATCH] Fix error on Windows builds (conversion from 'unsigned long' to 'uint8_t') Signed-off-by: Przemek Stekiel --- programs/x509/cert_req.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/x509/cert_req.c b/programs/x509/cert_req.c index 2f7126b92..524143844 100644 --- a/programs/x509/cert_req.c +++ b/programs/x509/cert_req.c @@ -117,7 +117,7 @@ struct options { static void ip_string_to_bytes(const char *str, uint8_t *bytes, int maxBytes) { for (int i = 0; i < maxBytes; i++) { - bytes[i] = strtoul(str, NULL, 16); + bytes[i] = (uint8_t) strtoul(str, NULL, 16); str = strchr(str, '.'); if (str == NULL || *str == '\0') { break;