mirror of
https://github.com/opentx/opentx.git
synced 2025-07-16 21:05:26 +03:00
Adresses comments in #2036 - Thanks to Damjan for the review!
This commit is contained in:
parent
e05b74b05c
commit
30e1d09584
2 changed files with 3 additions and 1 deletions
|
@ -166,6 +166,7 @@ const char *fileCopy(const char *filename, const char *srcDir, const char *destD
|
||||||
|
|
||||||
result = f_open(&dstFile, path, FA_CREATE_ALWAYS | FA_WRITE);
|
result = f_open(&dstFile, path, FA_CREATE_ALWAYS | FA_WRITE);
|
||||||
if (result != FR_OK) {
|
if (result != FR_OK) {
|
||||||
|
f_close(&srcFile);
|
||||||
return SDCARD_ERROR(result);
|
return SDCARD_ERROR(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -177,7 +177,8 @@ char *strAppend(char *dest, const char *source, int len)
|
||||||
{
|
{
|
||||||
while ((*dest++ = *source++)) {
|
while ((*dest++ = *source++)) {
|
||||||
if (--len == 0) {
|
if (--len == 0) {
|
||||||
*dest++ = '\0';
|
*dest = '\0';
|
||||||
|
return dest;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return dest - 1;
|
return dest - 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue