From b175b0ddf82a349245fea6be78a0e25c3eb207eb Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sat, 12 Mar 2011 17:47:46 +0000 Subject: Fix stupid svn path=/trunk/netsurf/; revision=11976 --- desktop/browser.c | 11 +++++------ desktop/save_complete.c | 8 ++++---- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/desktop/browser.c b/desktop/browser.c index bf2415a15..ecf43b61b 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -913,18 +913,17 @@ void browser_window_reload(struct browser_window *bw, bool all) if (all && content_get_type(bw->current_content) == CONTENT_HTML) { struct html_stylesheet *sheets; - struct content_html_object *objects; + struct content_html_object *object; unsigned int count; c = bw->current_content; /* invalidate objects */ - objects = html_get_objects(c, &count); + object = html_get_objects(c, &count); - for (i = 0; i != count; i++) { - if (objects[i].content != NULL) - content_invalidate_reuse_data( - objects[i].content); + for (; object != NULL; object = object->next) { + if (object->content != NULL) + content_invalidate_reuse_data(object->content); } /* invalidate stylesheets */ diff --git a/desktop/save_complete.c b/desktop/save_complete.c index 387b68d8b..855ed247e 100644 --- a/desktop/save_complete.c +++ b/desktop/save_complete.c @@ -115,7 +115,7 @@ bool save_complete_html(hlcache_handle *c, const char *path, bool index, struct save_complete_entry **list) { struct html_stylesheet *sheets; - struct content_html_object *objects; + struct content_html_object *object; char filename[256]; unsigned int i, count; xmlDocPtr doc; @@ -184,10 +184,10 @@ bool save_complete_html(hlcache_handle *c, const char *path, bool index, } /* save objects */ - objects = html_get_objects(c, &count); + object = html_get_objects(c, &count); - for (i = 0; i != count; i++) { - hlcache_handle *obj = objects[i].content; + for (; object != NULL; object = object->next) { + hlcache_handle *obj = object->content; const char *obj_data; unsigned long obj_size; -- cgit v1.2.3