Skip to content

Commit

Permalink
Use literal string concatenation in getDataPath
Browse files Browse the repository at this point in the history
This avoids an issue on some platforms (e.g.  conda-build 3 on
osx_arm64) where std::string(really_long_literal_string)+'/' ends
up with interstitial null characters that stop strcpy() and friends
from consuming the full, concatenated path.
  • Loading branch information
jvansanten committed Apr 20, 2021
1 parent bf069b0 commit b7e8555
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/library/detail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
namespace nuflux{
namespace detail{
std::string getDataPath(std::string fname){
return std::string(DATA_DIR)+'/'+fname;
return (DATA_DIR "/") + fname;
}
}
}

0 comments on commit b7e8555

Please sign in to comment.