home · contact · privacy
Client: Fix log window drawing bug (too small winmap allocated).
authorChristian Heller <c.heller@plomlompom.de>
Sat, 5 Sep 2015 00:12:40 +0000 (02:12 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Sat, 5 Sep 2015 00:12:40 +0000 (02:12 +0200)
TODO
src/client/draw_wins.c

diff --git a/TODO b/TODO
index c0428f70e62b06ebbf16bd972032addb58934cb2..212f5822f00e8cbd7b3410f17d12269569b19035 100644 (file)
--- a/TODO
+++ b/TODO
@@ -20,3 +20,5 @@ CLIENT:
 - re-work unnecessary complex command / keybinding / server message mapping
 
 - only send "ITEM_HERE" query to server when the dependent window is open
+
+- draw_win_log() is still buggy (make mem alloc for other line break styles!)
index 9857af522565dee13086b9deeaa3250c7065a826..e409d8747a63281a0f91c4958ac3e52062d18f27 100644 (file)
@@ -361,7 +361,7 @@ extern void draw_win_log(struct Win * win)
         if (x > win->frame_size.x || '\n' == world.log[i])
         {
             n_postbreak_lines++;
-            x = 0;
+            x = 1;
         }
     }
     if (n_postbreak_lines > win->frame_size.y)
@@ -369,6 +369,7 @@ extern void draw_win_log(struct Win * win)
         uint32_t size = n_postbreak_lines * (win->frame_size.x + 1);
         win->winmap = try_malloc(sizeof(chtype) * size, __func__);
         for (i = 0; i < size; win->winmap[i] = ' ', i++);
+        /* TODO: This should only be done with "long" line break style. */
         do_realloc_winmap = 0;
         draw_text_from_bottom(win, world.log);
         do_realloc_winmap = 1;