Skip to content

Commit

Permalink
Generator: Lua: swap nul character \0 for string.char(0)
Browse files Browse the repository at this point in the history
  • Loading branch information
IamPete1 authored and tridge committed Oct 25, 2024
1 parent 89d3863 commit 406a9a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion generator/mavgen_lua.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def generate(basename, xml):
if string.sub(v[2],2,2) == 'c' then
-- Got string, unpack includes 0 values to the set length
-- this is annoying, so remove them
result[v[1]] = string.gsub(result[v[1]], "\0", "")
result[v[1]] = string.gsub(result[v[1]], string.char(0), "")
end
end
end
Expand Down

0 comments on commit 406a9a9

Please sign in to comment.