mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-03 10:21:46 +02:00
zsh-workers/8026
This commit is contained in:
parent
f0a1c1aafe
commit
284eb73997
1 changed files with 6 additions and 6 deletions
12
Src/math.c
12
Src/math.c
|
@ -947,7 +947,7 @@ mathevalarg(char *s, char **ss)
|
|||
|
||||
/**/
|
||||
static void
|
||||
checkunary(int mtokc, char *ptr)
|
||||
checkunary(int mtokc, char *mptr)
|
||||
{
|
||||
int errmsg = 0;
|
||||
int tp = type[mtokc];
|
||||
|
@ -959,11 +959,11 @@ checkunary(int mtokc, char *ptr)
|
|||
errmsg = 2;
|
||||
}
|
||||
if (errmsg) {
|
||||
char errbuf[40];
|
||||
char errbuf[80];
|
||||
int len, over = 0;
|
||||
while (inblank(*ptr))
|
||||
ptr++;
|
||||
len = strlen(ptr);
|
||||
while (inblank(*mptr))
|
||||
mptr++;
|
||||
len = ztrlen(mptr);
|
||||
if (len > 10) {
|
||||
len = 10;
|
||||
over = 1;
|
||||
|
@ -971,7 +971,7 @@ checkunary(int mtokc, char *ptr)
|
|||
sprintf(errbuf, "bad math expression: %s expected at `%%l%s'",
|
||||
errmsg == 2 ? "operator" : "operand",
|
||||
over ? "..." : "");
|
||||
zerr(errbuf, ptr, len);
|
||||
zerr(errbuf, mptr, len);
|
||||
}
|
||||
unary = !(tp & OP_OPF);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue