aboutsummaryrefslogtreecommitdiff
path: root/optfunc.c
diff options
context:
space:
mode:
Diffstat (limited to 'optfunc.c')
-rw-r--r--optfunc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/optfunc.c b/optfunc.c
index da7e54c3d60a..974a6f6c8c8b 100644
--- a/optfunc.c
+++ b/optfunc.c
@@ -196,7 +196,7 @@ public void opt_j(int type, char *s)
error("Position target at screen line %d", &parg);
} else
{
- char buf[24];
+ char buf[INT_STRLEN_BOUND(long)+2];
SNPRINTF1(buf, sizeof(buf), ".%06ld", jump_sline_fraction);
len = (int) strlen(buf);
while (len > 2 && buf[len-1] == '0')
@@ -213,7 +213,7 @@ public void calc_jump_sline(void)
{
if (jump_sline_fraction < 0)
return;
- jump_sline = muldiv(sc_height, jump_sline_fraction, NUM_FRAC_DENOM);
+ jump_sline = (int) muldiv(sc_height, jump_sline_fraction, NUM_FRAC_DENOM);
}
/*
@@ -256,7 +256,7 @@ public void opt_shift(int type, char *s)
error("Horizontal shift %d columns", &parg);
} else
{
- char buf[24];
+ char buf[INT_STRLEN_BOUND(long)+2];
SNPRINTF1(buf, sizeof(buf), ".%06ld", shift_count_fraction);
len = (int) strlen(buf);
while (len > 2 && buf[len-1] == '0')
@@ -273,7 +273,7 @@ public void calc_shift_count(void)
{
if (shift_count_fraction < 0)
return;
- shift_count = muldiv(sc_width, shift_count_fraction, NUM_FRAC_DENOM);
+ shift_count = (int) muldiv(sc_width, shift_count_fraction, NUM_FRAC_DENOM);
}
#if USERFILE