st.c: avoid VLA
This commit is contained in:
parent
089de203f6
commit
193a9f317d
8
st.c
8
st.c
|
@ -823,7 +823,9 @@ externalpipe(const Arg *arg)
|
||||||
{
|
{
|
||||||
int fd[2];
|
int fd[2];
|
||||||
int y, m;
|
int y, m;
|
||||||
char str[(term.col + 1) * UTF_SIZ];
|
/* char str[(term.col + 1) * UTF_SIZ]; */
|
||||||
|
char *str;
|
||||||
|
str = malloc((term.col + 1) * UTF_SIZ * sizeof(char));
|
||||||
void (*psigpipe)(int);
|
void (*psigpipe)(int);
|
||||||
const ExternalPipe *ep = arg->v;
|
const ExternalPipe *ep = arg->v;
|
||||||
|
|
||||||
|
@ -2481,7 +2483,9 @@ tdumpsel(void)
|
||||||
void
|
void
|
||||||
tdumpline(int n)
|
tdumpline(int n)
|
||||||
{
|
{
|
||||||
char str[(term.col + 1) * UTF_SIZ];
|
/* char str[(term.col + 1) * UTF_SIZ]; */
|
||||||
|
char *str;
|
||||||
|
str = malloc((term.col + 1) * UTF_SIZ * sizeof(char));
|
||||||
|
|
||||||
tprinter(str, tgetline(str, &term.line[n][0]));
|
tprinter(str, tgetline(str, &term.line[n][0]));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue