|
|
|
|
56
|
// If the entry is a directory and the action is LS_SerialPrint
|
56
|
// If the entry is a directory and the action is LS_SerialPrint
|
57
|
if (DIR_IS_SUBDIR(&p) && lsAction != LS_Count && lsAction != LS_GetFilename) {
|
57
|
if (DIR_IS_SUBDIR(&p) && lsAction != LS_Count && lsAction != LS_GetFilename) {
|
58
|
|
58
|
|
59
|
- // Allocate enough stack space for the full path to a folder
|
|
|
60
|
- int len = strlen(prepend) + FILENAME_LENGTH + 1;
|
|
|
|
|
59
|
+ // Allocate enough stack space for the full path to a folder, trailing slash, and nul
|
|
|
60
|
+ int len = strlen(prepend) + FILENAME_LENGTH + 1 + 1;
|
61
|
char path[len];
|
61
|
char path[len];
|
62
|
|
62
|
|
63
|
// Get the short name for the item, which we know is a folder
|
63
|
// Get the short name for the item, which we know is a folder
|