Skip to content

Commit 1221a20

Browse files
committed
reversing the logic to check for .blank?
1 parent 7ff7c70 commit 1221a20

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/msf/core/db_manager/host.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,10 +177,10 @@ def report_host(opts)
177177
end
178178

179179
# Truncate the name field at the maximum field length
180-
if opts[:name]
181-
opts[:name] = opts[:name][0,255]
182-
else
180+
if opts[:name].blank?
183181
opts[:name] = addr
182+
else
183+
opts[:name] = opts[:name][0,255]
184184
end
185185

186186
if opts[:os_name]

0 commit comments

Comments
 (0)