fastimage 2.4.2 → 2.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ccdbb1bae657d9c0e935422f1194986c5b78bcc23cdf3fcba4bd741f764a3d28
|
|
4
|
+
data.tar.gz: 88e8d78e8958a33d36fa887a01cb55083ca424919fceaf252760e81148022c44
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 839a15a2876f6855bbe4a7efdce3d1243dcc591c6962623f809a98582e753e085ce0bb409be726ede08f0cdfd6f438add649fdaddd20ac509dcdd6dd60b992a4
|
|
7
|
+
data.tar.gz: 0efd8b69909220e73f8f5683c8275af8040f1e61f5a2687cf097face9fa5ce14d6d5a3d46c10cceed96b2200cc98ecc4f363f5ca2a15a5f1cb16fa3344b9bd7c
|
|
@@ -13,8 +13,11 @@ module FastImageParsing
|
|
|
13
13
|
@str = ''
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
-
# Peeking beyond the end of the input will raise
|
|
16
|
+
# Peeking beyond the end of the input will raise. A negative length would
|
|
17
|
+
# move the cursor backwards, so treat it as unparseable data.
|
|
17
18
|
def peek(n)
|
|
19
|
+
raise FastImage::CannotParseImage if n < 0
|
|
20
|
+
|
|
18
21
|
while @strpos + n > @str.size
|
|
19
22
|
unused_str = @str[@strpos..-1]
|
|
20
23
|
|
|
@@ -38,6 +41,8 @@ module FastImageParsing
|
|
|
38
41
|
end
|
|
39
42
|
|
|
40
43
|
def skip(n)
|
|
44
|
+
raise FastImage::CannotParseImage if n < 0
|
|
45
|
+
|
|
41
46
|
discarded = 0
|
|
42
47
|
fetched = @str[@strpos..-1].size
|
|
43
48
|
while n > fetched
|
data/lib/fastimage/version.rb
CHANGED