exifr 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ EXIF Reader 1.2.3
2
+ * bug fix; "[GH#40] Handle NUL-terminated ASCII strings"; thanks Malte Rohde
3
+
1
4
  EXIF Reader 1.2.2
2
5
  * bug fix; "use Reader delegator instead of adding method to File instance"; thanks Ivan Kuchin
3
6
 
data/lib/exifr/tiff.rb CHANGED
@@ -539,7 +539,7 @@ module EXIFR
539
539
  when 6 # signed byte
540
540
  len, pack = count, proc { |d| sign_byte(d) }
541
541
  when 2 # ascii
542
- len, pack = count, proc { |d| d.unpack("A*") }
542
+ len, pack = count, proc { |d| d.unpack('Z*') }
543
543
  when 3 # short
544
544
  len, pack = count * 2, proc { |d| d.unpack(data.short + '*') }
545
545
  when 8 # signed short
data/tests/tiff_test.rb CHANGED
@@ -190,4 +190,8 @@ class TIFFTest < TestCase
190
190
  def test_negative_exposure_bias_value
191
191
  assert_equal(-1.quo(3), TIFF.new(f('negative-exposure-bias-value.exif')).exposure_bias_value)
192
192
  end
193
+
194
+ def test_nul_terminated_strings
195
+ assert_equal 'GoPro', TIFF.new(f('gopro_hd2.exif')).make
196
+ end
193
197
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exifr
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 2
10
- version: 1.2.2
9
+ - 3
10
+ version: 1.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - R.W. van 't Veer
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2015-05-03 00:00:00 +02:00
18
+ date: 2015-06-22 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies: []
21
21