summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/system/hex2bin/hex2bin.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/system/hex2bin/hex2bin.c b/apps/system/hex2bin/hex2bin.c
index 28eb9df50..463de27e6 100644
--- a/apps/system/hex2bin/hex2bin.c
+++ b/apps/system/hex2bin/hex2bin.c
@@ -259,7 +259,14 @@ static int readstream(FAR struct lib_instream_s *instream,
ch = instream->get(instream);
}
- /* Read until the end of line is encountered */
+ /* Skip over the start code */
+
+ if (ch != EOF)
+ {
+ ch = instream->get(instream);
+ }
+
+ /* Then read, verify, and buffer until the end of line is encountered */
while (ch != EOF && nbytes < (MAXRECORD_ASCSIZE-1))
{