Skip to content

Commit

Permalink
Merge pull request #5 from choongyong/fix-unknown-mifare-tag
Browse files Browse the repository at this point in the history
fix: unknown MIFARE tag error.
  • Loading branch information
hexdigest committed Jun 30, 2017
2 parents 4049757 + 71d1591 commit 7b5ce5b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ruby-nfc/tags/mifare/tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Error < Exception; end
}

# common freefare functions prototypes
attach_function :freefare_tag_new, [:pointer, LibNFC::ISO14443a.by_value], :pointer
attach_function :freefare_tag_new, [:pointer, LibNFC::Target.by_value], :pointer
attach_function :freefare_free_tag, [:pointer], :void

# tag
Expand All @@ -37,7 +37,7 @@ class Tag < NFC::Tag
def initialize(target, reader)
super(target, reader)

@pointer = Mifare.freefare_tag_new(reader.ptr, target[:nti][:nai])
@pointer = Mifare.freefare_tag_new(reader.ptr, target)

raise Mifare::Error, "Unknown mifare tag" if @pointer.null?
end
Expand Down

0 comments on commit 7b5ce5b

Please sign in to comment.