# HG changeset patch # User Matti Hamalainen # Date 1456219412 -7200 # Node ID 63c5b1bf8b98ae0e4a27c4c5bf82e7d814cbc880 # Parent 78825ff741953b838dc8bac6adf1df29e807473d Rename a variable. diff -r 78825ff74195 -r 63c5b1bf8b98 th_string.c --- a/th_string.c Tue Feb 23 10:36:24 2016 +0200 +++ b/th_string.c Tue Feb 23 11:23:32 2016 +0200 @@ -159,16 +159,16 @@ int th_printf_vput_intstr(th_printf_ctx *ctx, th_printf_vputch vputch, - const char *buf, const int f_width, int pos, int f_prec, int f_flags, + const char *buf, const int f_width, int f_len, int f_prec, int f_flags, const char f_sign) { // Calculate necessary padding, if any - int ret, nwidth = f_width - pos; + int ret, nwidth = f_width - f_len; if (f_sign) nwidth--; - if (f_prec > 0 && f_prec > pos) + if (f_prec > 0 && f_prec > f_len) { nwidth = nwidth - f_prec + 1; f_flags &= ~TH_PF_ZERO; @@ -181,7 +181,7 @@ if (f_sign && (ret = vputch(ctx, f_sign)) == EOF) return ret; - if (f_prec > 0 && f_prec > pos) + if (f_prec > 0 && f_prec > f_len) { while (--f_prec) { @@ -192,9 +192,9 @@ } // Output the value - while (pos--) + while (f_len--) { - if ((ret = vputch(ctx, buf[pos])) == EOF) + if ((ret = vputch(ctx, buf[f_len])) == EOF) return ret; }