mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 21:22:39 -05:00
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
This commit is contained in:
parent
948984309a
commit
df4cb9bafc
2 changed files with 38 additions and 0 deletions
|
|
@ -65,6 +65,8 @@ my @forbidden_functions = ('^open$',
|
|||
'^fdprintf$',
|
||||
'^read_line$',
|
||||
'^[a-z]+dir$',
|
||||
'^strip_extension$',
|
||||
'^create_numbered_filename$',
|
||||
'^s?+rand$',
|
||||
'^strl?+cpy$',
|
||||
'^strl?+cat$',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue