diff --git a/TSRM/tsrm_virtual_cwd.c b/TSRM/tsrm_virtual_cwd.c index 14fc92b3433..3e8789f8af6 100644 --- a/TSRM/tsrm_virtual_cwd.c +++ b/TSRM/tsrm_virtual_cwd.c @@ -373,7 +373,8 @@ CWD_API int virtual_file_ex(cwd_state *state, const char *path, verify_path_func state->cwd[state->cwd_length++] = DEFAULT_SLASH; #endif memcpy(&state->cwd[state->cwd_length], ptr, ptr_length+1); - state->cwd_length += ptr_length; } + state->cwd_length += ptr_length; + } ptr = tsrm_strtok_r(NULL, TOKENIZER_STRING, &tok); }