diff options
author | Pixel <pixel@nobis-crew.org> | 2009-12-23 00:25:32 +0100 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2009-12-23 00:25:32 +0100 |
commit | 86df190bee91eb38038a39b98448dd1623db1b6f (patch) | |
tree | 57b9a7a79bbfcc71d00f38d762973e0465636e98 | |
parent | f6ac50837aabd69c6ea5892a858359f51f40ee03 (diff) |
Fixing limiter.
-rw-r--r-- | dalos-limiter.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dalos-limiter.lua b/dalos-limiter.lua index b8387e3..5badfbb 100644 --- a/dalos-limiter.lua +++ b/dalos-limiter.lua @@ -19,7 +19,7 @@ Limit: %i{The actual size this limiter is going to produce} self.color = cd.GREEN local obj = { h = h, - size = math.max(h:getsize(), self.limit), + size = math.min(h:getsize(), self.extra.limit), getname = function () return self.name end, do_read = function (self, count, userdata) return self.h:read(count, userdata) @@ -47,7 +47,8 @@ Limit: %i{The actual size this limiter is going to produce} tab.ntype = "Limiter" tab.get_settings = dalosp.limiter.get_settings local extra = { } - if settings then extra.limit = settings.limit end + if not settings then settings = {} end + extra.limit = settings.limit or 0 local obj = dalos.object(d, tab, extra) |