瀏覽代碼

Fix context range check

master
Arun Prakash Jana 5 年之前
父節點
當前提交
6ee257920d
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: A75979F35C080412
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. +1
    -1
      plugins/README.md
  2. +1
    -1
      src/nnn.c

+ 1
- 1
plugins/README.md 查看文件

@@ -188,7 +188,7 @@ Usage examples can be found in the Examples section below.

#### Get notified on file hover

If `NNN_FIFO` is set, `nnn` will open it and write every hovered files. This can be used in plugins, e.g. to implement file previews.
If `NNN_FIFO` is set, `nnn` will open it and write every hovered files. This can be used in plugins and external scripts, e.g. to implement file previews.

If a `NNN_FIFO` is set globally, each `nnn` instance will write to it, and a process reading from the pipe will get hovered path from every instance, interleaved.



+ 1
- 1
src/nnn.c 查看文件

@@ -4258,7 +4258,7 @@ static void readpipe(int fd, char **path, char **lastname, char **lastdir)
ctx = r + 1;
} else {
ctx = g_buf[0] - '0';
if (ctx > CTX_MAX)
if (ctx < 0 || ctx > CTX_MAX)
return;
}



||||||
x
 
000:0
Loading…
取消
儲存