aboutsummaryrefslogtreecommitdiff
path: root/toys/posix
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2020-06-16 10:32:27 -0500
committerRob Landley <rob@landley.net>2020-06-16 10:32:27 -0500
commit718d73c023b765f1434edb5def188847b4cc044a (patch)
tree3e8b3fa820826fcbe223ced9d8bcad247264a544 /toys/posix
parent1a4e631d484c8b373a39bd055af613b5f152924c (diff)
downloadtoybox-718d73c023b765f1434edb5def188847b4cc044a.tar.gz
Ryan Prichard reported that file wasn't getting gif heights right.
Diffstat (limited to 'toys/posix')
-rw-r--r--toys/posix/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/file.c b/toys/posix/file.c
index a1de9168..6fa51102 100644
--- a/toys/posix/file.c
+++ b/toys/posix/file.c
@@ -226,7 +226,7 @@ static void do_regular_file(int fd, char *name)
// https://www.w3.org/Graphics/GIF/spec-gif89a.txt
} else if (len>16 && (strstart(&s, "GIF87a") || strstart(&s, "GIF89a")))
xprintf("GIF image data, %d x %d\n",
- (int)peek_le(s, 2), (int)peek_le(s+8, 2));
+ (int)peek_le(s, 2), (int)peek_le(s+2, 2));
// TODO: parsing JPEG for width/height is harder than GIF or PNG.
else if (len>32 && !memcmp(toybuf, "\xff\xd8", 2)) xputs("JPEG image data");