aboutsummaryrefslogtreecommitdiff
path: root/test/unit/helpers.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/helpers.lua')
-rw-r--r--test/unit/helpers.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/unit/helpers.lua b/test/unit/helpers.lua
index a485a875ab..45bbaaeb10 100644
--- a/test/unit/helpers.lua
+++ b/test/unit/helpers.lua
@@ -129,7 +129,7 @@ end
local cstr = ffi.typeof('char[?]')
local function to_cstr(string)
- return cstr((string.len(string)) + 1, string)
+ return cstr(#string + 1, string)
end
-- initialize some global variables, this is still necessary to unit test