Skip to content

Commit

Permalink
Removing prefix if present (forgot that)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Pirogov committed Oct 2, 2012
1 parent 157a38f commit 2d0484e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/ffmaplib.rb
Expand Up @@ -248,6 +248,8 @@ def self.from_json(data)

def expand_mac(str)
return str if str.index(':') #is already regular mac format
str = str[-12..-1] if str.length>12 #not regular mac -> remove nodes_ prefix..
#.. and add colons
newmac = ''
0.upto(str.length-1) do |i|
newmac += str[i]
Expand Down

0 comments on commit 2d0484e

Please sign in to comment.