aboutsummaryrefslogtreecommitdiff
path: root/tiffer.h
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2023-06-22 18:09:41 +0200
committerPřemysl Eric Janouch <p@janouch.name>2023-06-22 18:33:31 +0200
commita1f6ffd226efcc0aa42b8a03046a2e1f09786d0d (patch)
tree9079c58e2c8339bf77b69df3cd77e01f83aebae9 /tiffer.h
parent1eee1831a5f6af817c835fbf69bb8c31bde4cb49 (diff)
downloadfiv-a1f6ffd226efcc0aa42b8a03046a2e1f09786d0d.tar.gz
fiv-a1f6ffd226efcc0aa42b8a03046a2e1f09786d0d.tar.xz
fiv-a1f6ffd226efcc0aa42b8a03046a2e1f09786d0d.zip
Make scripts capable of 32-bit Windows builds
Now binaries can be (cross-)built using GCC for 32- and 64-bit Windows. Additional improvements: - Within MSYS2, try to install the required dependencies automatically. - Within MSYS2, fix passing libdir paths to pkg-config. - Prune documentation from extracted package files, addressing the incredible slowness of Windows filesystem operations. - Fix the script name in README.adoc instructions.
Diffstat (limited to 'tiffer.h')
-rw-r--r--tiffer.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tiffer.h b/tiffer.h
index 1122773..b4e582e 100644
--- a/tiffer.h
+++ b/tiffer.h
@@ -161,7 +161,7 @@ static bool
tiffer_subifd(
const struct tiffer *self, uint32_t offset, struct tiffer *subreader)
{
- if (self->end - self->begin < offset)
+ if (self->begin > self->end || self->end - self->begin < offset)
return false;
*subreader = *self;