X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=src%2Fviewer.c;h=40e4bd7bf5a2761f05087ab7576d6782339156ab;hb=00c2ad02613ee0797c4403d7016d028223002f7a;hp=541318394cd2fe9998ccc0b84941f6b71b8eb1b7;hpb=08040438d06b9b64f12cd790765ec21c02397a6d;p=smdp.git diff --git a/src/viewer.c b/src/viewer.c index 5413183..40e4bd7 100644 --- a/src/viewer.c +++ b/src/viewer.c @@ -519,7 +519,7 @@ void inline_display(WINDOW *window, const char *c, const int colors) { cstack_t *stack = cstack_init(); // for each char in line - while(*c) { + for(; *c; c++) { // if char is in special char list if(strchr(special, *c)) { @@ -590,8 +590,6 @@ void inline_display(WINDOW *window, const char *c, const int colors) { // print regular char wprintw(window, "%c", *c); } - - c++; } // pop stack until empty to prevent formated trailing spaces