Skip to content

Commit

Permalink
crush/CrushCompiler.cc:884
Browse files Browse the repository at this point in the history
    bug fix: index out of range

Signed-off-by: xu biao <xubiao.codeyz@gmail.com>
  • Loading branch information
hzxubiao committed Sep 6, 2016
1 parent 990a920 commit b6e87cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/crush/CrushCompiler.cc
Expand Up @@ -881,7 +881,7 @@ int CrushCompiler::compile(istream& in, const char *infn)
while (getline(in, str)) {
// remove newline
int l = str.length();
if (l && str[l] == '\n')
if (l && str[l - 1] == '\n')
str.erase(l-1, 1);

line_val[line] = str;
Expand Down

0 comments on commit b6e87cf

Please sign in to comment.