nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 46a5092eee736c9edf4283dd20303f2d7d5c98b6
parent 01ab453cffd10a8ed3a25f7dbea1f4b042d88a8f
Author: Arun <engineerarun@gmail.com>
Date:   Thu,  2 Jun 2022 21:44:52 +0530

Merge pull request #1384 from N-R-K/fix_sizeof

fix incorrect usage of sizeof
Diffstat:
Msrc/nnn.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/nnn.c b/src/nnn.c @@ -2542,7 +2542,7 @@ static bool cpmv_rename(int choice, const char *path) uint_t count = 0, lines = 0; bool ret = FALSE; char *cmd = (choice == 'c' ? cp : mv); - char buf[sizeof(patterns[P_CPMVRNM]) + sizeof(cmd) + (PATH_MAX << 1)]; + char buf[sizeof(patterns[P_CPMVRNM]) + (MAX(sizeof(cp), sizeof(mv))) + (PATH_MAX << 1)]; fd = create_tmp_file(); if (fd == -1)