mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
libs/libc/stdio/lib_libvsprintf.c: Correct justification for alternate forms of %p and %P
This commit is contained in:
@@ -980,7 +980,8 @@ static void prejustify(FAR struct lib_outstream_s *obj, uint8_t fmt,
|
|||||||
uint8_t justify, uint8_t flags, int fieldwidth,
|
uint8_t justify, uint8_t flags, int fieldwidth,
|
||||||
int valwidth, int trunc)
|
int valwidth, int trunc)
|
||||||
{
|
{
|
||||||
bool althex = (fmt == 'x' || fmt == 'X') && IS_ALTFORM(flags);
|
bool althex = (fmt == 'x' || fmt == 'X' || fmt == 'p' || fmt == 'P')
|
||||||
|
&& IS_ALTFORM(flags);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* If there is integer precision, then use FMT_RJUST vs FMT_RJUST0 */
|
/* If there is integer precision, then use FMT_RJUST vs FMT_RJUST0 */
|
||||||
|
|||||||
Reference in New Issue
Block a user