summaryrefslogtreecommitdiff
path: root/apps/plugins/lua/rocklib_aux.pl
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2018-10-23 00:11:34 -0400
committerWilliam Wilgus <me.theuser@yahoo.com>2018-10-24 06:05:53 +0200
commitdf4cb9bafc66c3d88945b70389e0cb87cbcecf15 (patch)
tree89a5798812480118f94b08299acd0f84f63951c1 /apps/plugins/lua/rocklib_aux.pl
parent948984309a3c1dd6b92f018926e9831083c803e3 (diff)
downloadrockbox-df4cb9bafc66c3d88945b70389e0cb87cbcecf15.tar.gz
rockbox-df4cb9bafc66c3d88945b70389e0cb87cbcecf15.zip
Lua fix strip_extension and create_numbered_filename
Both of these functions modified the string in the lua stack per lua manual: 'When a C function receives a string argument from Lua, there are only two rules that it must observe: Not to pop the string from the stack while accessing it and never to modify the string' strip_extension will still work with old parameters and is thus backwards compatible strip_extension("filename") create_numbered_filename has changed slightly and IS NOT backwards compatible create_numbered_filename(path, prefix, suffix, [number]) (number defaults to -1) Change-Id: I34cf7e2f6f691f33d5ac2b2e995855a171fb99b3
Diffstat (limited to 'apps/plugins/lua/rocklib_aux.pl')
-rwxr-xr-xapps/plugins/lua/rocklib_aux.pl2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/plugins/lua/rocklib_aux.pl b/apps/plugins/lua/rocklib_aux.pl
index f04457f189..085a191ee3 100755
--- a/apps/plugins/lua/rocklib_aux.pl
+++ b/apps/plugins/lua/rocklib_aux.pl
@@ -65,6 +65,8 @@ my @forbidden_functions = ('^open$',
65 '^fdprintf$', 65 '^fdprintf$',
66 '^read_line$', 66 '^read_line$',
67 '^[a-z]+dir$', 67 '^[a-z]+dir$',
68 '^strip_extension$',
69 '^create_numbered_filename$',
68 '^s?+rand$', 70 '^s?+rand$',
69 '^strl?+cpy$', 71 '^strl?+cpy$',
70 '^strl?+cat$', 72 '^strl?+cat$',