Skip to content

Commit

Permalink
Fix bug #17470, get_exif_by_xxxx may fail when called with at least o…
Browse files Browse the repository at this point in the history
…ne argument
  • Loading branch information
rmagick committed Jan 25, 2008
1 parent ca5b661 commit 62a895f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/RMagick.rb
@@ -1,4 +1,4 @@
# $Id: RMagick.rb,v 1.64 2008/01/05 22:21:52 rmagick Exp $
# $Id: RMagick.rb,v 1.65 2008/01/25 00:43:01 rmagick Exp $
#==============================================================================
# Copyright (C) 2007 by Timothy P. Hunter
# Name: RMagick.rb
Expand Down Expand Up @@ -775,6 +775,7 @@ def get_exif_by_entry(*entry)
exif_data.split("\n").each { |exif| ary.push(exif.split('=')) }
end
else
get_exif_by_entry() # ensure properties is populated with exif data
entry.each do |name|
rval = self["EXIF:#{name}"]
ary.push([name, rval])
Expand All @@ -796,8 +797,9 @@ def get_exif_by_number(*tag)
end
end
else
get_exif_by_number() # ensure properties is populated with exif data
tag.each do |num|
rval = self["EXIF:#{'#%04X' % num}"]
rval = self['#%04X' % num.to_i]
hash[num] = rval == 'unknown' ? nil : rval
end
end
Expand Down

0 comments on commit 62a895f

Please sign in to comment.