aboutsummaryrefslogtreecommitdiff
path: root/bfd/tekhex.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2015-01-09 21:56:30 +0000
committerNick Clifton <nickc@redhat.com>2015-01-09 21:56:30 +0000
commitc6e8e93a865d429546037cf5746502aa253a1f2d (patch)
tree11351fd53a89e84952dec9cd94f082b0d1e8e305 /bfd/tekhex.c
parentea0d6bb94c47283ce54ad62485997e2aef296d43 (diff)
downloadgdb-c6e8e93a865d429546037cf5746502aa253a1f2d.zip
gdb-c6e8e93a865d429546037cf5746502aa253a1f2d.tar.gz
gdb-c6e8e93a865d429546037cf5746502aa253a1f2d.tar.bz2
Fixes a bug in the previous delat to tekhex.c which meant that valid tekhex files were being rejected.
* tekhex.c (getvalue): Fix thinko in test for correct extraction of value. (getsym): Return false if there was not enough data to extract the symbol.
Diffstat (limited to 'bfd/tekhex.c')
-rw-r--r--bfd/tekhex.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/tekhex.c b/bfd/tekhex.c
index 9444117..94b4773 100644
--- a/bfd/tekhex.c
+++ b/bfd/tekhex.c
@@ -288,7 +288,7 @@ getvalue (char **srcp, bfd_vma *valuep, char * endp)
*srcp = src;
*valuep = value;
- return len == 0;
+ return len == -1U;
}
static bfd_boolean
@@ -309,7 +309,7 @@ getsym (char *dstp, char **srcp, unsigned int *lenp, char * endp)
dstp[i] = 0;
*srcp = src + i;
*lenp = len;
- return TRUE;
+ return i == len;
}
static struct data_struct *