Skip to content

Commit

Permalink
don't strip last char in test.c if it's not eol
Browse files Browse the repository at this point in the history
  • Loading branch information
prusnak committed Dec 10, 2016
1 parent 566bcd0 commit 9344f23
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test.c
Expand Up @@ -35,7 +35,9 @@ int main(void)
return 1;
}
// remove newline
str[strlen(str) - 1] = 0;
if (str[strlen(str) - 1] == '\n') {
str[strlen(str) - 1] = 0;
}

side = qr_encode(QR_LEVEL_M, 0, str, 0, bitdata);

Expand Down

0 comments on commit 9344f23

Please sign in to comment.