1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-21 00:25:37 +00:00

Lua: Report bad arguments to edit_bookmark_dialoga

If edit_bookamrk_dialogs is given the wrong number or types of
arguments, report the problem to the user instead of failing silently.
This commit is contained in:
Miciah Dashiel Butler Masters 2009-04-05 12:57:35 +00:00
parent 34f8f6a58f
commit 6a8e0ccd9b
2 changed files with 3 additions and 0 deletions

2
NEWS
View File

@ -58,6 +58,8 @@ Miscellaneous:
(OpenSSL replacement).
* enhancement: Scrolling the entire contents of dialog boxes.
Especially useful for multi-file BitTorrent downloads.
* Report if the Lua function edit_bookmark_dialog receives the wrong
number or types of arguments instead of silently failing.
//////////////////////////////////////////////////////////////////////
The following changes should be removed from NEWS before ELinks 0.13.0

View File

@ -369,6 +369,7 @@ l_edit_bookmark_dialog(LS)
if (!lua_isstring(S, 1) || !lua_isstring(S, 2)
|| !lua_isstring(S, 3) || !lua_isfunction(S, 4)) {
alert_lua_error("bad arguments to edit_bookmark_dialog");
lua_pushnil(S);
return 1;
}