changeset 37011:322951bebfd6

Rename parameter. It isn't the number of items but the last index in use. Rewrite the condition in order ro reflect this.
author ib
date Sat, 29 Mar 2014 13:49:26 +0000
parents af84671a576f
children 79c50282f8ab
files gui/ui/render.c gui/ui/render.h
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/gui/ui/render.c	Fri Mar 28 19:03:59 2014 +0000
+++ b/gui/ui/render.c	Sat Mar 29 13:49:26 2014 +0000
@@ -396,7 +396,7 @@
     }
 }
 
-void RenderAll(wsWindow *window, guiItem *items, int nrItems, char *drawbuf)
+void RenderAll(wsWindow *window, guiItem *items, int till, char *drawbuf)
 {
     uint32_t *db;
     guiItem *item;
@@ -406,7 +406,7 @@
     db = (uint32_t *)drawbuf;
     dw = window->Width;
 
-    for (i = 0; i < nrItems + 1; i++) {
+    for (i = 0; i <= till; i++) {
         item = &items[i];
 
         switch (item->pressed) {
--- a/gui/ui/render.h	Fri Mar 28 19:03:59 2014 +0000
+++ b/gui/ui/render.h	Sat Mar 29 13:49:26 2014 +0000
@@ -22,6 +22,6 @@
 #include "gui/app/app.h"
 #include "gui/wm/ws.h"
 
-void RenderAll(wsWindow *window, guiItem *items, int nrItems, char *drawbuf);
+void RenderAll(wsWindow *window, guiItem *items, int till, char *drawbuf);
 
 #endif /* MPLAYER_GUI_RENDER_H */