1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-11-26 14:41:10 +01:00

44307: allow for atoi() returning a negative number

This commit is contained in:
Oliver Kiddle 2019-05-20 00:14:01 +02:00
parent 09917e558b
commit 3de2333b08
5 changed files with 12 additions and 6 deletions

View file

@ -2201,10 +2201,10 @@ getstrvalue(Value v)
if (v->flags & VALFLAG_SUBST) {
if (v->pm->node.flags & (PM_LEFT|PM_RIGHT_B|PM_RIGHT_Z)) {
unsigned int fwidth = v->pm->width ? v->pm->width : MB_METASTRLEN(s);
size_t fwidth = v->pm->width ? (unsigned int)v->pm->width : MB_METASTRLEN(s);
switch (v->pm->node.flags & (PM_LEFT | PM_RIGHT_B | PM_RIGHT_Z)) {
char *t, *tend;
unsigned int t0;
size_t t0;
case PM_LEFT:
case PM_LEFT | PM_RIGHT_Z:
@ -5858,7 +5858,7 @@ printparamnode(HashNode hn, int printflags)
doneminus = 0;
}
if ((pmptr->flags & PMTF_USE_WIDTH) && p->width) {
printf("%d ", p->width);
printf("%u ", p->width);
doneminus = 0;
}
}