summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/edit.c13
-rw-r--r--mbbsd/read.c2
2 files changed, 7 insertions, 8 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c
index 02eca6b2..eda5da08 100644
--- a/mbbsd/edit.c
+++ b/mbbsd/edit.c
@@ -1835,28 +1835,27 @@ vedit(char *fpath, int saveheader, int *islocal)
char *tmp, *apos = ans;
int fg, bg;
- strlcpy(color, "\033[", sizeof(color));
+ strcpy(color, "\033[");
if (isdigit(*apos)) {
- snprintf(color, sizeof(color),
- "%s%c", color, *(apos++));
+ sprintf(color,"%s%c", color, *(apos++));
if (*apos)
- snprintf(color, sizeof(color), "%s;", color);
+ strcat(color, ";");
}
if (*apos) {
if ((tmp = strchr(t, toupper(*(apos++)))))
fg = tmp - t + 30;
else
fg = 37;
- snprintf(color, sizeof(color), "%s%d", color, fg);
+ sprintf(color, "%s%d", color, fg);
}
if (*apos) {
if ((tmp = strchr(t, toupper(*(apos++)))))
bg = tmp - t + 40;
else
bg = 40;
- snprintf(color, sizeof(color), "%s;%d", color, bg);
+ sprintf(color, "%s;%d", color, bg);
}
- snprintf(color, sizeof(color), "%sm", color);
+ strcat(color, "m");
insert_string(color);
} else
insert_string(reset_color);
diff --git a/mbbsd/read.c b/mbbsd/read.c
index 06ed39b7..b2db9715 100644
--- a/mbbsd/read.c
+++ b/mbbsd/read.c
@@ -591,7 +591,7 @@ i_read_key(onekey_t * rcmdlist, char default_ch, keeploc_t * locmem,
case '8':
case '9':
if((num = search_num(ch, last_line))!=-1)
- new_ln = num;
+ new_ln = num+1;
break;
case 'q':
case 'e':