summaryrefslogtreecommitdiffstatshomepage
path: root/plugins
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2016-03-30 15:28:06 -0500
committer cracyc <cracyc@users.noreply.github.com>2016-03-30 15:28:06 -0500
commitbe431bd5a0290b9bd6a11edcb71d30e4a2ab0e29 (patch)
treeb1f651d482d3687697570f11b2a8ad9174307f79 /plugins
parent5195d772c7ae9f77cc1c4fe00a6ffd7929614c4b (diff)
hiscore: checksum all the regions (nw)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/hiscore/init.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/plugins/hiscore/init.lua b/plugins/hiscore/init.lua
index d1466623931..647aca11608 100644
--- a/plugins/hiscore/init.lua
+++ b/plugins/hiscore/init.lua
@@ -170,12 +170,10 @@ function hiscore.startplugin()
local function check_scores ( posdata )
local r = 0;
- -- commonly the first entry will be for the entire table
- -- so it will only trigger a write once a player enters
- -- his/her name in.
- local row = positions[1];
- for i=0,row["size"]-1 do
+ for ri,row in ipairs(posdata) do
+ for i=0,row["size"]-1 do
r = r + row["mem"]:read_u8( row["addr"] + i );
+ end
end
return r;
end