diff options
| author | 2020-06-07 00:34:46 +0530 | |
|---|---|---|
| committer | 2020-06-07 00:35:05 +0530 | |
| commit | fdfbac03869a0250bcee4b8e9c486490f270aa9c (patch) | |
| tree | f013957be5453f8789ab6be31c30b9c23be126a8 /src | |
| parent | 58411446b71843b8307f8b20f9507b6327429334 (diff) | |
| download | nnn-fdfbac03869a0250bcee4b8e9c486490f270aa9c.tar.gz | |
Fix #639: store NNNLVL in tmp var
Diffstat (limited to 'src')
| -rw-r--r-- | src/nnn.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -6377,11 +6377,12 @@ nochange: case SEL_SHELL: /* Set nnn nesting level */ tmp = getenv(env_cfg[NNNLVL]); - setenv(env_cfg[NNNLVL], xitoa((tmp ? atoi(tmp) : 0) + 1), 1); + r = tmp ? atoi(tmp) : 0; + setenv(env_cfg[NNNLVL], xitoa(r + 1), 1); setenv(envs[ENV_NCUR], (ndents ? dents[cur].name : ""), 1); spawn(shell, NULL, NULL, F_CLI); - setenv(env_cfg[NNNLVL], xitoa(tmp ? atoi(tmp) : 0), 1); + setenv(env_cfg[NNNLVL], xitoa(r), 1); r = TRUE; break; case SEL_LAUNCH: |