Fix warning: sign-compare in @base64d format (#3287)

This commit is contained in:
itchyny authored and GitHub committed 2025-03-06 17:07:54 +09:00
1 parent 94fd973ebb
commit 668871bdfa
1 file changed
+1 -1
+1 -1
View File
@@ -734,7 +734,7 @@ static jv f_format(jq_state *jq, jv input, jv fmt) {
input = f_tostring(jq, input);
const unsigned char* data = (const unsigned char*)jv_string_value(input);
int len = jv_string_length_bytes(jv_copy(input));
size_t decoded_len = MAX((3 * (size_t)len) / 4, 1); // 3 usable bytes for every 4 bytes of input
size_t decoded_len = MAX((3 * (size_t)len) / 4, (size_t)1); // 3 usable bytes for every 4 bytes of input
char *result = jv_mem_calloc(decoded_len, sizeof(char));
uint32_t ri = 0;
int input_bytes_read=0;