From 0e4c9599468ab102e6a612439db6df0248410483 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Sun, 12 Jun 2016 20:17:48 +0800 Subject: builtin: Fix handling of trailing IFS white spaces The read built-in does not handle trailing IFS white spaces in the right way, when there are more fields than variables. Part of the problem is that this case is handled outside of ifsbreakup. Harald van Dijk wrote a patch to fix this by moving the magic into ifsbreakup itself. This patch further reorganises the ifsbreakup loop by having only one loop over the whole string. Signed-off-by: Herbert Xu Tested-by: Harald van Dijk --- src/expand.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/expand.h') diff --git a/src/expand.h b/src/expand.h index 6a90f67..26dc5b4 100644 --- a/src/expand.h +++ b/src/expand.h @@ -69,7 +69,7 @@ char *_rmescapes(char *, int); int casematch(union node *, char *); void recordregion(int, int, int); void removerecordregions(int); -void ifsbreakup(char *, struct arglist *); +void ifsbreakup(char *, int, struct arglist *); void ifsfree(void); /* From arith.y */ -- cgit 1.4.1