summaryrefslogtreecommitdiff
path: root/src/xxd
diff options
context:
space:
mode:
Diffstat (limited to 'src/xxd')
-rw-r--r--src/xxd/xxd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xxd/xxd.c b/src/xxd/xxd.c
index 2b3ee9c03..f57d78634 100644
--- a/src/xxd/xxd.c
+++ b/src/xxd/xxd.c
@@ -275,6 +275,9 @@ long base_off;
if (c == '\r') /* Doze style input file? */
continue;
+ if (c == ' ' || c == '\n' || c == '\t') /* allow multiple spaces */
+ continue;
+
n3 = n2;
n2 = n1;
@@ -334,7 +337,7 @@ long base_off;
n1 = -1;
if ((++p >= cols) && !hextype)
{
- /* skip rest of line as garbaga */
+ /* skip rest of line as garbage */
want_off = 0;
while ((c = getc(fpi)) != '\n' && c != EOF)
;