aboutsummaryrefslogtreecommitdiff
path: root/shell/shell_common.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2020-08-23 10:59:38 +0100
committerRon Yorston <rmy@pobox.com>2020-08-23 10:59:38 +0100
commit5dbbfe22dd28c3b3ecd5763cc8e60406136e87ce (patch)
tree64c983708f9f2a21a2fbec14a06d85057d886dfd /shell/shell_common.c
parent64ecd10486934c12336dac84c67a1939dce0e096 (diff)
parenta949399d178f7b052ada2099c62621736eafce44 (diff)
downloadbusybox-w32-5dbbfe22dd28c3b3ecd5763cc8e60406136e87ce.tar.gz
busybox-w32-5dbbfe22dd28c3b3ecd5763cc8e60406136e87ce.tar.bz2
busybox-w32-5dbbfe22dd28c3b3ecd5763cc8e60406136e87ce.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'shell/shell_common.c')
-rw-r--r--shell/shell_common.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/shell/shell_common.c b/shell/shell_common.c
index e50a79b78..a6ee60851 100644
--- a/shell/shell_common.c
+++ b/shell/shell_common.c
@@ -271,8 +271,10 @@ shell_builtin_read(struct builtin_read_params *params)
271#endif 271#endif
272 272
273 c = buffer[bufpos]; 273 c = buffer[bufpos];
274 if (c == '\0' || (ENABLE_PLATFORM_MINGW32 && c == '\r')) 274#if ENABLE_PLATFORM_MINGW32
275 if (c == '\r')
275 continue; 276 continue;
277#endif
276 if (!(read_flags & BUILTIN_READ_RAW)) { 278 if (!(read_flags & BUILTIN_READ_RAW)) {
277 if (backslash) { 279 if (backslash) {
278 backslash = 0; 280 backslash = 0;
@@ -287,6 +289,8 @@ shell_builtin_read(struct builtin_read_params *params)
287 } 289 }
288 if (c == delim) /* '\n' or -d CHAR */ 290 if (c == delim) /* '\n' or -d CHAR */
289 break; 291 break;
292 if (c == '\0')
293 continue;
290 294
291 /* $IFS splitting. NOT done if we run "read" 295 /* $IFS splitting. NOT done if we run "read"
292 * without variable names (bash compat). 296 * without variable names (bash compat).