Prevent negative array index for realColumn in calcPosition()
Bug-Debian: https://github.com/tats/w3m/issues/69
This commit is contained in:
2
etc.c
2
etc.c
@@ -498,7 +498,7 @@ calcPosition(char *l, Lineprop *pr, int len, int pos, int bpos, int mode)
|
|||||||
static char *prevl = NULL;
|
static char *prevl = NULL;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
if (l == NULL || len == 0)
|
if (l == NULL || len == 0 || pos < 0)
|
||||||
return bpos;
|
return bpos;
|
||||||
if (l == prevl && mode == CP_AUTO) {
|
if (l == prevl && mode == CP_AUTO) {
|
||||||
if (pos <= len)
|
if (pos <= len)
|
||||||
|
|||||||
Reference in New Issue
Block a user