summaryrefslogtreecommitdiff
path: root/ami.c
diff options
context:
space:
mode:
Diffstat (limited to 'ami.c')
-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;
}