summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreutils/uudecode.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c
index 6ecfe6c..23ff711 100644
--- a/coreutils/uudecode.c
+++ b/coreutils/uudecode.c
@@ -125,10 +125,11 @@ int uudecode_main(int argc UNUSED_PARAM, char **argv)
mode = bb_strtou(line_ptr, NULL, 8);
if (outname == NULL) {
outname = strchr(line_ptr, ' ');
- if ((outname == NULL) || (*outname == '\0')) {
+ if (!outname)
break;
- }
outname++;
+ if (!outname[0])
+ break;
}
dst_stream = stdout;
if (NOT_LONE_DASH(outname)) {