From e198a40b3a0c5bd112297d2dfefe95ec02852f8c Mon Sep 17 00:00:00 2001 From: gitlost Date: Wed, 23 Dec 2020 11:12:36 +0000 Subject: [PATCH] #209 AZTEC_RUNE casts --- backend/aztec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/aztec.c b/backend/aztec.c index a6aa49eb..3cd24f05 100644 --- a/backend/aztec.c +++ b/backend/aztec.c @@ -100,7 +100,7 @@ static char get_next_mode(char encode_mode[], const int src_len, int i) { } } -static int az_bin_append_posn(const int arg, const int length, char *binary, int bin_posn) { +static int az_bin_append_posn(const int arg, const int length, char *binary, const int bin_posn) { if (bin_posn + length > AZTEC_BIN_CAPACITY) { return 0; /* Fail */ @@ -1507,8 +1507,8 @@ INTERNAL int aztec_runes(struct zint_symbol *symbol, unsigned char source[], int bp = bin_append_posn(input_value, 8, binary_string, bp); - data_codewords[0] = input_value >> 4; - data_codewords[1] = input_value & 0xF; + data_codewords[0] = (unsigned char) (input_value >> 4); + data_codewords[1] = (unsigned char) (input_value & 0xF); rs_init_gf(&rs, 0x13); rs_init_code(&rs, 5, 1);