format conversion does not behave as advertised
Reported by mathieu.belleville
BUG DESCRIPTION:
----------------
The following statement is valid as per the printf_conversion help page:
printf("%*s\n",10,"foo");
Quote:"A field width or precision can be indicated by an * (asterisk) instead of a digit string. In this case, an integer value parameter supplies the field width or precision. The value parameter converted for output is not fetched until the conversion letter is reached, so the parameters specifying field width or precision must appear before the value to be converted (if any)."
Expected result is:
foo
Obtained result is:
-->printf("%*s\n",10,"foo")
!--error 999
mprintf: Wrong number of input arguments: at most 1 expected.
ERROR LOG:
----------
mprintf: Wrong number of input arguments: at most 1 expected.
HOW TO REPRODUCE THE BUG:
-------------------------
printf("%*s\n",10,"foo");
OTHER INFORMATION:
------------------
The number of argument check in mprintf should be corrected (preferred solution), or the help page of printf_conversion.