The precision argument while printing a double with given precision seems to be treated as width instead.
Documentation
%.*g, print floating point number with given precision. Expect int, double
Test 1
int num_precision = 10;
double num = 123.1234567891;
char *s = mjson_aprintf("{%Q:%.*g}", "num", num_precision, num);
printf("%s\n", s);
free(s);
// output: {"num":123.1234568}
Test 2
int num_precision = 13;
double num = 123.1234567891;
char *s = mjson_aprintf("{%Q:%.*g}", "num", num_precision, num);
printf("%s\n", s);
free(s);
// output: {"num":123.1234567891}