mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Fixes some bugs related with SEE
This commit is contained in:
parent
fd1c3510f5
commit
cbb1c5ea23
@ -603,10 +603,10 @@ form_elems_get(struct SEE_interpreter *interp, struct SEE_object *o,
|
||||
}
|
||||
SEE_SET_STRING(&argv, p);
|
||||
if (string[0] >= '0' && string[1] <= '9') {
|
||||
js_form_elems_item(interp, o, NULL, 1,
|
||||
js_form_elems_item(interp, o, o, 1,
|
||||
(struct SEE_value **)&argv, res);
|
||||
} else {
|
||||
js_form_elems_namedItem(interp, o, NULL, 1,
|
||||
js_form_elems_namedItem(interp, o, o, 1,
|
||||
(struct SEE_value **)&argv, res);
|
||||
}
|
||||
mem_free(string);
|
||||
@ -630,7 +630,7 @@ js_forms_item(struct SEE_interpreter *interp, struct SEE_object *self,
|
||||
{
|
||||
struct global_object *g = (struct global_object *)interp;
|
||||
struct view_state *vs = g->win->vs;
|
||||
struct js_forms_object *fo = (struct js_forms_object *)thisobj;
|
||||
struct js_forms_object *fo = (struct js_forms_object *)self;
|
||||
struct js_document_object *doc = fo->parent;
|
||||
struct form_view *fv;
|
||||
unsigned char *string;
|
||||
@ -668,7 +668,7 @@ js_forms_namedItem(struct SEE_interpreter *interp, struct SEE_object *self,
|
||||
struct view_state *vs = g->win->vs;
|
||||
struct document_view *doc_view = vs->doc_view;
|
||||
struct document *document = doc_view->document;
|
||||
struct js_forms_object *fo = (struct js_forms_object *)thisobj;
|
||||
struct js_forms_object *fo = (struct js_forms_object *)self;
|
||||
struct js_document_object *doc = fo->parent;
|
||||
struct form *form;
|
||||
unsigned char *string;
|
||||
@ -716,18 +716,19 @@ forms_get(struct SEE_interpreter *interp, struct SEE_object *o,
|
||||
} else {
|
||||
unsigned char *string = SEE_string_to_unsigned_char(p);
|
||||
struct SEE_value argv;
|
||||
struct SEE_value *argv1 = &argv;
|
||||
|
||||
if (!string) {
|
||||
SEE_SET_UNDEFINED(res);
|
||||
return;
|
||||
}
|
||||
SEE_SET_STRING(&argv, p);
|
||||
if (string[0] >= '0' && string[1] <= '9') {
|
||||
js_forms_item(interp, o, NULL, 1,
|
||||
(struct SEE_value **)&argv, res);
|
||||
SEE_SET_STRING(argv1, p);
|
||||
if (string[0] >= '0' && string[0] <= '9') {
|
||||
js_forms_item(interp, o, fo->item, 1,
|
||||
(struct SEE_value **)&argv1, res);
|
||||
} else {
|
||||
js_forms_namedItem(interp, o, NULL, 1,
|
||||
(struct SEE_value **)&argv, res);
|
||||
js_forms_namedItem(interp, o, fo->namedItem, 1,
|
||||
(struct SEE_value **)&argv1, res);
|
||||
}
|
||||
mem_free(string);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user