summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-06-15 13:28:03 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-06-15 13:28:03 -0600
commit47670d9c2a85c767e675498bed522d4586aeefa1 (patch)
tree0040bd46bde5480b1c52899b47c63bdadd708c58 /apps
parentad828bb05defec4a1439501b4ed0acfedd0d732a (diff)
downloadnuttx-47670d9c2a85c767e675498bed522d4586aeefa1.tar.gz
nuttx-47670d9c2a85c767e675498bed522d4586aeefa1.tar.bz2
nuttx-47670d9c2a85c767e675498bed522d4586aeefa1.zip
hex2bin: Start code should not be in buffer
Diffstat (limited to 'apps')
-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))
{