mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
fix a mistake of 803408f18
spotted by n1s
When the source string terminates (with a 0) we pad the rest of the destination with spaces.
This commit is contained in:
parent
7803f31c53
commit
dae7a29b35
1 changed files with 1 additions and 1 deletions
|
@ -1218,7 +1218,7 @@ static void send_csw(int status)
|
|||
static void copy_padded(char *dest, char *src, int len)
|
||||
{
|
||||
for (int i = 0; i < len; i++) {
|
||||
if (src[i] != 0) {
|
||||
if (src[i] == '\0') {
|
||||
memset(&dest[i], ' ', len - i);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue