aboutsummaryrefslogtreecommitdiff
path: root/shell/shell_common.c
diff options
context:
space:
mode:
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).