Browse Source

Include space for the terminating nul in lsDive

Scott Lahteine 10 years ago
parent
commit
417706e578
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/cardreader.cpp

+ 1
- 1
Marlin/cardreader.cpp View File

62
 
62
 
63
       // Allocate enough stack space for the full path to a folder, trailing slash, and nul
63
       // Allocate enough stack space for the full path to a folder, trailing slash, and nul
64
       boolean prepend_is_empty = (prepend[0] == '\0');
64
       boolean prepend_is_empty = (prepend[0] == '\0');
65
-      int len = strlen(prepend) + (prepend_is_empty ? 1 : 0) + strlen(lfilename) + 1;
65
+      int len = strlen(prepend) + (prepend_is_empty ? 1 : 0) + strlen(lfilename) + 1 + 1;
66
       char path[len];
66
       char path[len];
67
 
67
 
68
       // Append the FOLDERNAME12/ to the passed string.
68
       // Append the FOLDERNAME12/ to the passed string.

Loading…
Cancel
Save