return EOS on EOS just to be on the safe side
This commit is contained in:
parent
1a316664ef
commit
0d6e622b14
6
tree.c
6
tree.c
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/tree.c,v 1.45 2011/05/02 22:52:54 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/tree.c,v 1.46 2011/05/04 22:38:27 tg Exp $");
|
||||||
|
|
||||||
#define INDENT 8
|
#define INDENT 8
|
||||||
|
|
||||||
|
@ -283,7 +283,7 @@ wdvarput(struct shf *shf, const char *wp, int quotelevel, int opmode)
|
||||||
while (/* CONSTCOND */ 1)
|
while (/* CONSTCOND */ 1)
|
||||||
switch (*wp++) {
|
switch (*wp++) {
|
||||||
case EOS:
|
case EOS:
|
||||||
return (wp);
|
return (--wp);
|
||||||
case ADELIM:
|
case ADELIM:
|
||||||
case CHAR:
|
case CHAR:
|
||||||
c = *wp++;
|
c = *wp++;
|
||||||
|
@ -754,7 +754,7 @@ dumpwdvar_(struct shf *shf, const char *wp, int quotelevel)
|
||||||
switch(*wp++) {
|
switch(*wp++) {
|
||||||
case EOS:
|
case EOS:
|
||||||
shf_puts("EOS", shf);
|
shf_puts("EOS", shf);
|
||||||
return (wp);
|
return (--wp);
|
||||||
case ADELIM:
|
case ADELIM:
|
||||||
shf_puts("ADELIM=", shf);
|
shf_puts("ADELIM=", shf);
|
||||||
if (0)
|
if (0)
|
||||||
|
|
Loading…
Reference in New Issue