Fixed bug - glk_stylehint_set doesn't loop infinitely anymore
authorfliep <fliep@ddfedd41-794f-dd11-ae45-00112f111e67>
Wed, 7 Oct 2009 21:02:05 +0000 (21:02 +0000)
committerfliep <fliep@ddfedd41-794f-dd11-ae45-00112f111e67>
Wed, 7 Oct 2009 21:02:05 +0000 (21:02 +0000)
libchimara/style.c

index 2d00428d5ec6c889b2abb1f14a5acc8d0b9ddc10..07a10fef638ecccb3404972014d9397aae776c31 100644 (file)
@@ -462,8 +462,8 @@ glk_stylehint_set(glui32 wintype, glui32 styl, glui32 hint, glsi32 val)
        gchar *tag_name = get_tag_name(styl);
 
        /* Iterate over all the window and update their styles if nessecary */
-       winid_t win = glk_window_iterate(NULL, NULL);
-       while(win != NULL) {
+       winid_t win;
+       for(win = glk_window_iterate(NULL, NULL); win; win = glk_window_iterate(win, NULL)) {
                if(wintype != wintype_TextBuffer)
                        continue; /* FIXME: add support for text grid windows */