summaryrefslogtreecommitdiffstatshomepage
path: root/plugins
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2017-07-27 22:14:09 -0500
committer cracyc <cracyc@users.noreply.github.com>2017-07-27 22:14:09 -0500
commit97a4f94d17e02c0155804a6353cc716b16473f23 (patch)
tree02f22637e55dc3f8bb82ffdde07a9f3b2b6826a9 /plugins
parentc3d5b9856d5135dfb03d9233232555c972acffc8 (diff)
plugins/data: fix small things (nw)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/data/data_command.lua6
-rw-r--r--plugins/data/load_dat.lua1
2 files changed, 6 insertions, 1 deletions
diff --git a/plugins/data/data_command.lua b/plugins/data/data_command.lua
index 6923d80c1e8..5e22274e5f0 100644
--- a/plugins/data/data_command.lua
+++ b/plugins/data/data_command.lua
@@ -3,7 +3,7 @@ local info, ver
local datread = require("data/load_dat")
do
local convert = require("data/button_char")
- datread, ver = datread.open("command.dat", "# Command List%-Shorthand", convert)
+ datread, ver = datread.open("command.dat", "# Command List%-.+hand", convert)
end
function dat.check(set, softlist)
@@ -23,4 +23,8 @@ function dat.get()
return info
end
+function dat.ver()
+ return ver
+end
+
return dat
diff --git a/plugins/data/load_dat.lua b/plugins/data/load_dat.lua
index 6f80458c593..d222dde5b0a 100644
--- a/plugins/data/load_dat.lua
+++ b/plugins/data/load_dat.lua
@@ -141,6 +141,7 @@ function datfile.open(file, vertag, fixupcb)
set:gsub("([^,]+)", function(s) sets[#sets + 1] = s end)
if #tags > 0 and #sets > 0 then
local tag1 = info2:match("^$([^%s]*)")
+ data = data:gsub("\r", "") -- strip crs
if fixupcb then
data = fixupcb(data)
end