diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-12 05:10:34 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-12 05:10:34 -0500 |
commit | 62a0a9691097f9adadff76612402184b55096ef3 (patch) | |
tree | cb4b9c1b4ccc7dfeeceb0862fc6729b39886b06b /hscript/disk.cc | |
parent | a76bb9c5dbe5d010bb37738cebf110b21b5b9ef2 (diff) | |
download | horizon-62a0a9691097f9adadff76612402184b55096ef3.tar.gz horizon-62a0a9691097f9adadff76612402184b55096ef3.tar.bz2 horizon-62a0a9691097f9adadff76612402184b55096ef3.tar.xz horizon-62a0a9691097f9adadff76612402184b55096ef3.zip |
hscript: Fix incorrect usage of std::string::substr
Diffstat (limited to 'hscript/disk.cc')
-rw-r--r-- | hscript/disk.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hscript/disk.cc b/hscript/disk.cc index c0b0de9..217dbcb 100644 --- a/hscript/disk.cc +++ b/hscript/disk.cc @@ -38,7 +38,7 @@ Key *Mount::parseFromData(const std::string data, int lineno, int *errors, opt_pos = data.find_first_of(' ', where_pos); dev = data.substr(0, where_pos); - where = data.substr(where_pos + 1, opt_pos); + where = data.substr(where_pos + 1, (opt_pos - where_pos - 1)); if(opt_pos != std::string::npos) { opt = data.substr(opt_pos); } |