This is the David Smart RA8875 Library with mods for working with FRDM-K64F
Diff: TextDisplay.cpp
- Revision:
- 141:2ec78a50dc98
- Parent:
- 104:8d1d3832a215
- Child:
- 167:8aa3fb2a5a31
--- a/TextDisplay.cpp Tue Dec 27 15:46:18 2016 +0000 +++ b/TextDisplay.cpp Thu Dec 29 20:06:00 2016 +0000 @@ -26,8 +26,9 @@ if (name == NULL) { _path = NULL; } else { - _path = new char[strlen(name) + 2]; - sprintf(_path, "/%s", name); + int len = strlen(name) + 2; + _path = new char[len]; + snprintf(_path, len, "/%s", name); } }