Skip to content

Commit 9c1b561

Browse files
committed
pocketbook: fix inkview version check
Relax pattern so it can match "U627.6.0.1118".
1 parent 3c8c56c commit 9c1b561

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ffi/inkview.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ ffi.cdef[[
55
char *GetSoftwareVersion();
66
]]
77

8-
-- format is $model.$major.$minor.$build, like "U743g.6.8.4143"
8+
-- format is $model.$major.$minor.$build, like "U743g.6.8.4143", or "U627.6.0.1118"
99
local software_version = ffi.string(inkview.GetSoftwareVersion())
1010
print(string.format("PocketBook software version: %s", software_version))
11-
local version_major, version_minor = software_version:match("([1-9][0-9]*)[.]([1-9][0-9]*)[.][1-9][0-9]*$")
11+
local version_major, version_minor = software_version:match("[.](%d+)[.](%d+)[.]%d+$")
1212
if not version_major or not version_minor then
1313
error("could not parse PocketBook software version: "..software_version)
1414
end

0 commit comments

Comments
 (0)