summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Goodbody <ajg02@elfringham.co.uk>2010-03-27 13:12:52 +0100
committerLuc Verhaegen <libv@skynet.be>2010-03-27 13:12:52 +0100
commit586c943fb9ce7eedd1e326a8e9244bd8dc408d30 (patch)
tree5a5cbf1a26f164f0361a519217b6e5370dc6117a
parentb75b76af0b4bfcedda042200ea63e392b6144d30 (diff)
AMI: If BufferSize = 0, also try to get bigpart size.
-rw-r--r--ami.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ami.c b/ami.c
index d93ffa6..018eb3d 100644
--- a/ami.c
+++ b/ami.c
@@ -249,7 +249,7 @@ AMI95Extract(unsigned char *BIOSImage, int BIOSLength, int BIOSOffset,
else
BufferSize = le16toh(part->CSize);
- if ((BufferSize == 0xFFFF) && !Compressed) {
+ if (((BufferSize == 0xFFFF) || !BufferSize) && !Compressed) {
bigpart = (struct bigpart *) (BIOSImage + (Offset - BIOSOffset) - sizeof(struct bigpart));
BufferSize = bigpart->CSize;
}