Skip to content

Commit dff79d2

Browse files
committed
Fix broken raid code.
1 parent 45c7c6d commit dff79d2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Common/Cpp/Options/RandomCodeOption.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ std::string RaidCodeOption::get_code() const{
5151
if (m_random_digits == 0){
5252
std::string qstr = sanitize_code(8, m_code);
5353
for (int c = 0; c < 8; c++){
54-
code[c] = qstr[c] - '0';
54+
code[c] = qstr[c];
5555
}
5656
return code;
5757
}
@@ -61,7 +61,7 @@ std::string RaidCodeOption::get_code() const{
6161
do{
6262
x = rand() & 0x0f;
6363
}while (x >= 10);
64-
code[c] = x;
64+
code[c] = x + '0';
6565
}
6666
for (size_t c = m_random_digits; c < m_digits; c++){
6767
code[c] = code[c - 1];

0 commit comments

Comments
 (0)