[CodeFactor] Apply fixes

develop
codefactor-io 2018-07-01 15:25:53 +00:00
parent 93a197b3d4
commit a08f08ae5f
2 changed files with 3 additions and 3 deletions

@ -487,7 +487,7 @@ module DFHack
def length
if @_length == -1
maxlen = 4096 - (@_memaddr & 0xfff)
maxlen += 4096 until len = DFHack.memory_read(@_memaddr, maxlen).index(?\0)
maxlen += 4096 until len = DFHack.memory_read(@_memaddr, maxlen).index("\0")
len
else
@_length

@ -80,7 +80,7 @@ module DFHack
@onupdate_list ||= []
@onupdate_list << OnupdateCallback.new(descr, b, ticklimit, initialtickdelay)
DFHack.onupdate_active = true
if onext = @onupdate_list.sort.first
if onext = @onupdate_list.min
DFHack.onupdate_minyear = onext.minyear
DFHack.onupdate_minyeartick = onext.minyeartick
end
@ -123,7 +123,7 @@ module DFHack
o.check_run(y, yt, ytmax)
}
if onext = @onupdate_list.sort.first
if onext = @onupdate_list.min
DFHack.onupdate_minyear = onext.minyear
if ytmax > TICKS_PER_YEAR
DFHack.onupdate_minyeartick = -1