- fixed_subst_name[target_ntpath_nchars] = L'\\';
- wmemcpy(&fixed_subst_name[target_ntpath_nchars + 1],
- relpath, relpath_nchars);
+ if (relpath_nchars) {
+ fixed_subst_name[target_ntpath_nchars] = L'\\';
+ wmemcpy(&fixed_subst_name[target_ntpath_nchars + 1],
+ relpath, relpath_nchars);
+ }