diff --git a/picoquic/logger.c b/picoquic/logger.c
index be2414439f5fccbb3d6d17a85b77f2e645fbbd6c..0d4b40788dc3115ed231079e66c60205951fa2fe 100644
--- a/picoquic/logger.c
+++ b/picoquic/logger.c
@@ -880,7 +880,7 @@ size_t picoquic_log_retire_connection_id_frame(FILE* F, uint8_t* bytes, size_t b
     }
 
     if (l_seq == 0 || byte_index > bytes_max) {
-        fprintf(F, "    Malformed RETIRE CONNECTION ID, requires %d bytes out of %d\n", (int)(byte_index + (l_seq == 0)?1:0), (int)bytes_max);
+        fprintf(F, "    Malformed RETIRE CONNECTION ID, requires %d bytes out of %d\n", (int)(byte_index + ((l_seq == 0)?1:0)), (int)bytes_max);
         byte_index = bytes_max;
     }
     else {