Commit af7b3efb authored by Deucе's avatar Deucе 👌🏾
Browse files

Actually constify showbuf()

Geeze, this is ugly.
parent 4f28970f
Pipeline #2701 failed with stage
in 7 minutes and 58 seconds
...@@ -2755,7 +2755,6 @@ void showbuf(int mode, int left, int top, int width, int height, const char *tit ...@@ -2755,7 +2755,6 @@ void showbuf(int mode, int left, int top, int width, int height, const char *tit
tmp_buffer2[0].ch=api->chars->help_top_left; tmp_buffer2[0].ch=api->chars->help_top_left;
j=title_len; j=title_len;
if(j>width-6) { if(j>width-6) {
*(title+width-6)=0;
j=width-6; j=width-6;
} }
for(i=1;i<(width-j)/2;i++) for(i=1;i<(width-j)/2;i++)
...@@ -2769,7 +2768,7 @@ void showbuf(int mode, int left, int top, int width, int height, const char *tit ...@@ -2769,7 +2768,7 @@ void showbuf(int mode, int left, int top, int width, int height, const char *tit
} }
tmp_buffer2[i].ch = api->chars->help_titlebreak_left; tmp_buffer2[i].ch = api->chars->help_titlebreak_left;
i+=2; i+=2;
for(pc=title;*pc;pc++) { for(pc=title;*pc && pc < &title[j];pc++) {
tmp_buffer2[i].ch=*pc; tmp_buffer2[i].ch=*pc;
i++; i++;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment