Skip to content

Commit

Permalink
fix casting of printf widths
Browse files Browse the repository at this point in the history
  • Loading branch information
alexlancaster committed Feb 25, 2024
1 parent 5e1af8d commit a55cc77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/emhaplofreq/emhaplofreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ int main_proc(
/* remove the trailing haplotype separator character in haplotype */
/* FIXME: the need for a trailing character should be removed when creating haplotype */
#ifdef XML_OUTPUT
xmlfprintf(fp_out, "<haplotype name=\"%.*s\"><frequency>%.5f</frequency><numCopies>%.1f</numCopies></haplotype>\n", (strlen(haplo[i]) - 1), haplo[i], freq_zero[i], freq_zero[i]*2.0*n_recs);
xmlfprintf(fp_out, "<haplotype name=\"%.*s\"><frequency>%.5f</frequency><numCopies>%.1f</numCopies></haplotype>\n", ((int) strlen(haplo[i]) - 1), haplo[i], freq_zero[i], freq_zero[i]*2.0*n_recs);
#else
xmlfprintf(fp_out, "%3d %12.5f %8.1f %.*s\n", j, freq_zero[i], freq_zero[i]*2.0*n_recs, (strlen(haplo[i]) - 1), haplo[i]);
#endif
Expand Down

0 comments on commit a55cc77

Please sign in to comment.