diff options
author | Rafaël Carré <funman@videolan.org> | 2012-05-07 12:54:11 -0400 |
---|---|---|
committer | Rafaël Carré <funman@videolan.org> | 2012-05-07 12:54:11 -0400 |
commit | dae7a29b35db0ac4911007180389cdc0e98d5af5 (patch) | |
tree | 9e291c6462c3af3cc796af7989278f4eb3f7cd34 /firmware/usbstack | |
parent | 7803f31c531c75c75d57513caa14caa934edcf19 (diff) |
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.
Diffstat (limited to 'firmware/usbstack')
-rw-r--r-- | firmware/usbstack/usb_storage.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/usbstack/usb_storage.c b/firmware/usbstack/usb_storage.c index c1f278b0ff..b7fdeac7e2 100644 --- a/firmware/usbstack/usb_storage.c +++ b/firmware/usbstack/usb_storage.c @@ -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; } |