diff --git a/Makefile b/Makefile index 0390a89d5..93bd9b3bf 100644 --- a/Makefile +++ b/Makefile @@ -43,7 +43,7 @@ bootstrapemu: test -e $(EMU_DIR)/koreader-base || (cd $(EMU_DIR) && ln -s ../$(KOR_BASE)/koreader-base ./) test -e $(EMU_DIR)/extr || (cd $(EMU_DIR) && ln -s ../$(KOR_BASE)/extr ./) test -e $(EMU_DIR)/reader.lua || (cd $(EMU_DIR) && ln -s ../reader.lua ./) - test -e $(EMU_DIR)/history || (cd $(EMU_DIR) && mkdir history) + test -e $(EMU_DIR)/history || (mkdir $(EMU_DIR)/history) customupdate: $(KOR_BASE)/koreader-base $(KOR_BASE)/extr # ensure that the binaries were built for ARM diff --git a/frontend/document/document.lua b/frontend/document/document.lua index 1ed675564..bc460d000 100644 --- a/frontend/document/document.lua +++ b/frontend/document/document.lua @@ -165,7 +165,8 @@ This method returns pagesize if bbox is corrupted function Document:getUsedBBoxDimensions(pageno, zoom, rotation) local bbox = self:getPageBBox(pageno) local ubbox_dimen = nil - if bbox.x0 < 0 or bbox.y0 < 0 or bbox.x1 < 0 or bbox.y1 < 0 then + if (bbox.x0 < 0) or (bbox.y0 < 0) or (bbox.x1 < 0) or (bbox.y1 < 0) + or (bbox.x0 == bbox.x1) or (bbox.y0 == bbox.y1) then -- if document's bbox info is corrupted, we use the page size ubbox_dimen = self:getPageDimensions(pageno, zoom, rotation) else