]> Kevux Git Server - fll/commit
Bugfix: Raw formatted print sometimes prints trailing NULL.
authorKevin Day <thekevinday@gmail.com>
Sat, 11 Dec 2021 03:36:42 +0000 (21:36 -0600)
committerKevin Day <thekevinday@gmail.com>
Sat, 11 Dec 2021 03:36:42 +0000 (21:36 -0600)
commit09f504dc89205fa1163789cceae2704286e65950
tree441432314f56a799d3019d96e5be02f4176c3935
parent701ad8cfe3c690969e4fd2c682dc98b49ce5b21c
Bugfix: Raw formatted print sometimes prints trailing NULL.

A logic flaw is resulting in the last NULL after the max length is reached to be printed.

When the strnlen() calculates the length and the calculated length is the requested max length, the subsequent line attempts to print any NULLs.
This is normally fine, except that it needs to check to make sure that "i" is less than the requested max length.
level_0/f_print/c/private-print.c